-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Runs commands on remote machines using ssh
--   
--   Lets you quickly run ssh on a machine that you have an sshfs
--   connection to. It works out the username, host and the directory on
--   the host based on the current directory and the output of
--   <a>mount</a>.
@package vado
@version 0.0.9


-- | Lets you quickly run ssh on a machine that you have an sshfs
--   connection to. It works out the username, host and the directory on
--   the host based on the current directory and the output of
--   <tt>mount</tt>
module System.Process.Vado

-- | Remote file system mount point
data MountPoint
MountPoint :: Text -> Text -> FilePath -> FilePath -> MountPoint

-- | Account used on remote machine
[remoteUser] :: MountPoint -> Text

-- | Host name or address of the remote machine
[remoteHost] :: MountPoint -> Text

-- | Directory on remote machine
[remoteDir] :: MountPoint -> FilePath

-- | Where it is mounted on this machine
[localDir] :: MountPoint -> FilePath

-- | Parses a line looking for a remote mount point
parseMountPoint :: String -> Maybe MountPoint

-- | Run <tt>mount</tt> and look up the mount point relating to the
--   directory in the output
getMountPoint :: FilePath -> IO (Either MountPoint String)

-- | Mount point settings
data MountSettings
MountSettings :: Text -> Text -> Int -> FilePath -> MountSettings
[sshfsUser] :: MountSettings -> Text
[sshfsHost] :: MountSettings -> Text
[sshfsPort] :: MountSettings -> Int
[idFile] :: MountSettings -> FilePath

-- | Read a list of predefined mount points from the ~/.vadosettings files
readSettings :: IO [MountSettings]

-- | Default mount settings for vagrant
defMountSettings :: IO MountSettings

-- | Get a list of arguments to pass to ssh to run command on a remote
--   machine in the directory that is mounted locally
vado :: MountPoint -> [MountSettings] -> FilePath -> [String] -> FilePath -> [String] -> IO [String]

-- | Get a list of arguments to pass to sshfs to mount a remote filesystem
--   in the given directory
vamount :: MountSettings -> FilePath -> FilePath -> [String] -> [String]
instance GHC.Read.Read System.Process.Vado.MountSettings
instance GHC.Show.Show System.Process.Vado.MountSettings
instance GHC.Classes.Eq System.Process.Vado.MountPoint
instance GHC.Classes.Ord System.Process.Vado.MountPoint
instance GHC.Show.Show System.Process.Vado.MountPoint
