Gtk2HsContentsIndex
System.Gnome.VFS.Xfer
Maintainergtk2hs-devel@lists.sourceforge.net Stability : alpha Portability : portable (depends on GHC)
Contents
Types
Operations
Description
Synopsis
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
= XferFollowLinks
| XferRecursive
| XferSamefs
| XferDeleteItems
| XferEmptyDirectories
| XferNewUniqueDirectory
| XferRemovesource
| XferUseUniqueNames
| XferLinkItems
| XferFollowLinksRecursive
| XferTargetDefaultPerms
data XferOverwriteMode
= XferOverwriteModeAbort
| XferOverwriteModeReplace
| XferOverwriteModeSkip
data XferErrorAction
= XferErrorActionAbort
| XferErrorActionRetry
| XferErrorActionSkip
data XferOverwriteAction
= XferOverwriteActionAbort
| XferOverwriteActionReplace
| XferOverwriteActionReplaceAll
| XferOverwriteActionSkip
| XferOverwriteActionSkipAll
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
Constructors
XferProgressInfo
xferProgressInfoVFSStatus :: Resultcurrent VFS status
xferProgressInfoPhase :: XferPhasephase of the transfer
xferProgressInfoSourceName :: (Maybe String)currently transferring source URI
xferProgressInfoTargetName :: (Maybe String)currently transferring target URI
xferProgressInfoFileIndex :: Wordindex of the file currently being transferred
xferProgressInfoFilesTotal :: Wordtotal number of files being transferred
xferProgressInfoBytesTotal :: FileSizetotal size of all files in bytes
xferProgressInfoFileSize :: FileSizesize of the file currently being transferred
xferProgressInfoBytesCopied :: FileSizenumber of bytes already transferred in the current file
xferProgressInfoTotalBytesCopied :: FileSizetotal number of bytes already transferred
xferProgressInfoTopLevelItem :: BoolTrue if the file being transferred is a top-level item; False if it is inside a directory
show/hide Instances
data XferOptions
Options controlling how the xferURI and related functions behave.
Constructors
XferFollowLinks
XferRecursive
XferSamefs
XferDeleteItems
XferEmptyDirectories
XferNewUniqueDirectory
XferRemovesource
XferUseUniqueNames
XferLinkItems
XferFollowLinksRecursive
XferTargetDefaultPerms
show/hide Instances
data XferOverwriteMode
Constructors
XferOverwriteModeAbort
XferOverwriteModeReplace
XferOverwriteModeSkip
show/hide Instances
data XferErrorAction
Constructors
XferErrorActionAbort
XferErrorActionRetry
XferErrorActionSkip
show/hide Instances
data XferOverwriteAction
Constructors
XferOverwriteActionAbort
XferOverwriteActionReplace
XferOverwriteActionReplaceAll
XferOverwriteActionSkip
XferOverwriteActionSkipAll
show/hide Instances
type XferProgressCallback
 = XferProgressInfoinfo - information about the progress of the current transfer
-> IO Boolreturn False to abort the transfer, True otherwise.
The type of the first callback that is passed to xferURI and related functions. This callback will be called periodically during transfers that are progressing normally.
type XferErrorCallback
 = XferProgressInfoinfo - information about the progress of the current transfer
-> IO XferErrorActionthe action to be performed in response to the error
The type of the second callback that is passed to xferURI. This callback will be called whenever an error occurs.
type XferOverwriteCallback
 = XferProgressInfoinfo - information about the progress of the current transfer
-> IO XferOverwriteActionthe action to be performed when the target file already exists
The type of the third callback that is passed to xferURI. This callback will be called when a file would be overwritten.
type XferDuplicateCallback
 = XferProgressInfoinfo - information about the progress of the current transfer
-> StringduplicateName - the name of the target file
-> IntduplicateCount - the number of duplicates that exist
-> IO (Maybe String)the new filename that should be used, or Nothing to abort.
The type of the fourth callback that is passed to xferURI. This callback will be called when a duplicate filename is found.
Operations
xferURI
:: URIsourceURI - the source URI
-> URItargetURI - the target URI
-> [XferOptions]options -
-> Maybe XferProgressCallbackprogressCallback -
-> Maybe XferErrorCallbackerrorCallback -
-> Either XferOverwriteMode XferOverwriteCallbackoverwriteOpt -
-> Maybe XferDuplicateCallbackduplicateCallback -
-> IO ()
Transfer the file located at sourceURI to targetURI, using the specified options and callbacks.
xferURIList
:: [(URI, URI)]sourceTargetURIList -
-> [XferOptions]options -
-> Maybe XferProgressCallbackprogressCallback -
-> Maybe XferErrorCallbackerrorCallback -
-> Either XferOverwriteMode XferOverwriteCallbackoverwriteOpt -
-> Maybe XferDuplicateCallbackduplicateCallback -
-> IO ()
For each pair in sourceTargetURIList, transfer the file at the first URI to the second URI.
xferDeleteList
:: [URI]sourceURIList -
-> [XferOptions]options -
-> Maybe XferProgressCallbackprogressCallback -
-> Maybe XferErrorCallbackerrorCallback -
-> IO ()
Delete the files at the URIs in sourceURIList.
Produced by Haddock version 0.8