| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Simplex.FileTransfer.Client.Main
Synopsis
- data SendOptions = SendOptions {
- filePath :: FilePath
- outputDir :: Maybe FilePath
- numRecipients :: Int
- xftpServers :: [XFTPServerWithAuth]
- retryCount :: Int
- tempPath :: Maybe FilePath
- verbose :: Bool
- newtype CLIError = CLIError String
- xftpClientCLI :: IO ()
- cliSendFile :: SendOptions -> ExceptT CLIError IO ()
- cliSendFileOpts :: SendOptions -> Bool -> (Int64 -> Int64 -> IO ()) -> ExceptT CLIError IO ()
- encodeWebURI :: FileDescription 'FRecipient -> ByteString
- decodeWebURI :: ByteString -> Either String (ValidFileDescription 'FRecipient)
- fileWebLink :: FileDescription 'FRecipient -> Maybe (ByteString, ByteString)
- singleChunkSize :: Int64 -> Maybe Word32
- prepareChunkSizes :: Int64 -> [Word32]
- prepareChunkSpecs :: FilePath -> [Word32] -> [XFTPChunkSpec]
- getChunkDigest :: XFTPChunkSpec -> IO ByteString
Documentation
data SendOptions Source #
Constructors
| SendOptions | |
Fields
| |
Instances
| Show SendOptions Source # | |
Defined in Simplex.FileTransfer.Client.Main Methods showsPrec :: Int -> SendOptions -> ShowS show :: SendOptions -> String showList :: [SendOptions] -> ShowS | |
Constructors
| CLIError String |
Instances
| Exception CLIError Source # | |
Defined in Simplex.FileTransfer.Client.Main Methods toException :: CLIError -> SomeException fromException :: SomeException -> Maybe CLIError displayException :: CLIError -> String | |
| Show CLIError Source # | |
| Eq CLIError Source # | |
xftpClientCLI :: IO () Source #
cliSendFile :: SendOptions -> ExceptT CLIError IO () Source #
cliSendFileOpts :: SendOptions -> Bool -> (Int64 -> Int64 -> IO ()) -> ExceptT CLIError IO () Source #
encodeWebURI :: FileDescription 'FRecipient -> ByteString Source #
Encode file description as web-compatible URI fragment.
Result is base64url(deflateRaw(YAML)), no leading #.
decodeWebURI :: ByteString -> Either String (ValidFileDescription 'FRecipient) Source #
Decode web URI fragment to validated file description.
Input is base64url-encoded DEFLATE-compressed YAML, no leading #.
fileWebLink :: FileDescription 'FRecipient -> Maybe (ByteString, ByteString) Source #
Extract web link host and URI fragment from a file description. Returns (hostname, uriFragment) for https://hostname/#uriFragment.
singleChunkSize :: Int64 -> Maybe Word32 Source #
prepareChunkSizes :: Int64 -> [Word32] Source #
prepareChunkSpecs :: FilePath -> [Word32] -> [XFTPChunkSpec] Source #
getChunkDigest :: XFTPChunkSpec -> IO ByteString Source #