Portability | portable (depends on GHC) |
---|---|
Stability | alpha |
Maintainer | gtk2hs-devel@lists.sourceforge.net |
- data XferProgressInfo = XferProgressInfo {
- xferProgressInfoVFSStatus :: Result
- xferProgressInfoPhase :: XferPhase
- xferProgressInfoSourceName :: Maybe String
- xferProgressInfoTargetName :: Maybe String
- xferProgressInfoFileIndex :: Word
- xferProgressInfoFilesTotal :: Word
- xferProgressInfoBytesTotal :: FileSize
- xferProgressInfoFileSize :: FileSize
- xferProgressInfoBytesCopied :: FileSize
- xferProgressInfoTotalBytesCopied :: FileSize
- xferProgressInfoTopLevelItem :: Bool
- data XferOptions
- data XferOverwriteMode
- data XferErrorAction
- data XferOverwriteAction
- type XferProgressCallback = XferProgressInfo -> IO Bool
- type XferErrorCallback = XferProgressInfo -> IO XferErrorAction
- type XferOverwriteCallback = XferProgressInfo -> IO XferOverwriteAction
- type XferDuplicateCallback = XferProgressInfo -> String -> Int -> IO (Maybe String)
- xferURI :: URI -> URI -> [XferOptions] -> Maybe XferProgressCallback -> Maybe XferErrorCallback -> Either XferOverwriteMode XferOverwriteCallback -> Maybe XferDuplicateCallback -> IO ()
- xferURIList :: [(URI, URI)] -> [XferOptions] -> Maybe XferProgressCallback -> Maybe XferErrorCallback -> Either XferOverwriteMode XferOverwriteCallback -> Maybe XferDuplicateCallback -> IO ()
- xferDeleteList :: [URI] -> [XferOptions] -> Maybe XferProgressCallback -> Maybe XferErrorCallback -> IO ()
Types
data XferProgressInfo Source
XferProgressInfo | |
|
data XferOptions Source
Options controlling how the System.Gnome.VFS.Xfer.xferURI
and related functions behave.
data XferOverwriteMode Source
data XferErrorAction Source
type XferProgressCallback = XferProgressInfo -> IO BoolSource
type XferErrorCallback = XferProgressInfo -> IO XferErrorActionSource
The type of the second callback that is passed to
System.Gnome.VFS.Xfer.xferURI
. This callback will be called
whenever an error occurs.
The callback must return the action to be performed in response to the error.
type XferOverwriteCallback = XferProgressInfo -> IO XferOverwriteActionSource
The type of the third callback that is passed to
System.Gnome.VFS.Xfer.xferURI
. This callback will be called
when a file would be overwritten.
The callback must return the action to be performed when the target file already exists.
type XferDuplicateCallback = XferProgressInfo -> String -> Int -> IO (Maybe String)Source
The type of the fourth callback that is passed to
System.Gnome.VFS.Xfer.xferURI
. This callback will be called
when a duplicate filename is found.
The parameters, from left to right, are:
* info
- information about the progress of the current transfer,
* duplicateName
- the name of the target file,
* duplicateCount
- the number of duplicates that exist.
The callback must return the new filename that should be used, or Nothing
to abort.
Operations
:: URI |
|
-> URI |
|
-> [XferOptions] |
|
-> Maybe XferProgressCallback |
|
-> Maybe XferErrorCallback |
|
-> Either XferOverwriteMode XferOverwriteCallback |
|
-> Maybe XferDuplicateCallback |
|
-> IO () |
Transfer the file located at sourceURI
to targetURI
, using
the specified options and callbacks.
:: [(URI, URI)] |
|
-> [XferOptions] |
|
-> Maybe XferProgressCallback |
|
-> Maybe XferErrorCallback |
|
-> Either XferOverwriteMode XferOverwriteCallback |
|
-> Maybe XferDuplicateCallback |
|
-> IO () |
:: [URI] |
|
-> [XferOptions] |
|
-> Maybe XferProgressCallback |
|
-> Maybe XferErrorCallback |
|
-> IO () |
Delete the files at the URI
s in sourceURIList
.