| Gtk2Hs | Contents | Index

System.Gnome.VFS.Directory

Maintainer | gtk2hs-devel@lists.sourceforge.net Stability : alpha Portability : portable (depends on GHC) Functions for creating, removing, and accessing directories and their contents.

Contents

Types
Directory Creation
Directory Removal
Directory Access
Directory Traversal

Description
Synopsis

data DirectoryHandle

data DirectoryVisitOptions

= DirectoryVisitDefault
| DirectoryVisitSamefs
| DirectoryVisitLoopcheck
| DirectoryVisitIgnoreRecurseError

data DirectoryVisitResult

= DirectoryVisitStop
| DirectoryVisitContinue
| DirectoryVisitRecurse

makeDirectory :: TextURI -> [FilePermissions] -> IO ()
makeDirectoryForURI :: URI -> [FilePermissions] -> IO ()
removeDirectory :: TextURI -> IO ()
removeDirectoryFromURI :: URI -> IO ()
directoryOpen :: TextURI -> [FileInfoOptions] -> IO DirectoryHandle
directoryOpenFromURI :: URI -> [FileInfoOptions] -> IO DirectoryHandle
directoryReadNext :: DirectoryHandle -> IO FileInfo
directoryClose :: DirectoryHandle -> IO ()
directoryListLoad :: TextURI -> [FileInfoOptions] -> IO [FileInfo]
directoryVisit :: String -> [FileInfoOptions] -> [DirectoryVisitOptions] -> DirectoryVisitCallback -> IO ()
directoryVisitURI :: URI -> [FileInfoOptions] -> [DirectoryVisitOptions] -> DirectoryVisitCallback -> IO ()
directoryVisitFiles :: TextURI -> [String] -> [FileInfoOptions] -> [DirectoryVisitOptions] -> DirectoryVisitCallback -> IO ()
directoryVisitFilesAtURI :: URI -> [String] -> [FileInfoOptions] -> [DirectoryVisitOptions] -> DirectoryVisitCallback -> IO ()

Types
data DirectoryHandle

A handle to an open directory.

data DirectoryVisitOptions

Options controlling the way in which a directories are visited.
Constructors

DirectoryVisitDefault |
DirectoryVisitSamefs |
DirectoryVisitLoopcheck |
DirectoryVisitIgnoreRecurseError |

Instances

Bounded DirectoryVisitOptions
Enum DirectoryVisitOptions
Eq DirectoryVisitOptions
Show DirectoryVisitOptions
Flags DirectoryVisitOptions

data DirectoryVisitResult

An enumerated value that must be returned from a `DirectoryVisitCallback`. The directoryVisit and related functions will perform the action specified.
Constructors

DirectoryVisitStop | stop visiting files
DirectoryVisitContinue | continue as normal
DirectoryVisitRecurse | recursively visit the current entry

Instances

Enum DirectoryVisitResult
Eq DirectoryVisitResult

Directory Creation
makeDirectory

:: TextURI | `textURI` - String representation of the URI of the directory to create
-> [FilePermissions] | `perm` - `FilePermissions` for the newly created directory
-> IO () |
Create `textURI` as a directory. Only succeeds if a file or directory does not already exist at `textURI`.

makeDirectoryForURI

:: URI | `uri` - `URI` of the directory to be created
-> [FilePermissions] | `perm` - `FilePermissions` for the newly created directory
-> IO () |
Create `uri` as a directory. Only succeeds if a file or directory does not already exist at `uri`.

Directory Removal
removeDirectory

:: TextURI | `textURI` - URI of the directory to be removed
-> IO () |
Remove the directory at `textURI`. The object at `textURI` must be an empty directory.

removeDirectoryFromURI

:: URI | `uri` - `URI` of the directory to be removed
-> IO () |
Remove the directory at `uri`. The object at `uri` must be an empty directory.

Directory Access
directoryOpen

:: TextURI | `textURI` - String representation of the URI of the directory to open
-> [FileInfoOptions] | `fileInfoOptions` - options for reading file information
-> IO DirectoryHandle | handle to the opened directory
Open directory textURI for reading. Returns a `DirectoryHandle` which can be used to read directory entries one by one.

directoryOpenFromURI

:: URI | `uri` - `URI` of the directory to open
-> [FileInfoOptions] | `fileInfoOptions` - options for reading file information
-> IO DirectoryHandle | handle to the opened directory
Open directory textURI for reading. Returns a `DirectoryHandle` which can be used to read directory entries one by one.

directoryReadNext

:: DirectoryHandle | `handle` - a directory handle
-> IO FileInfo | file information for the next directory entry
Read the next directory entry from a `DirectoryHandle`.

directoryClose

:: DirectoryHandle | `handle` - a directory handle
-> IO () |
Close a `DirectoryHandle`.

directoryListLoad

:: TextURI | `textURI` - String representation of the URI of the directory to load
-> [FileInfoOptions] | `options` - options for reading file information
-> IO [FileInfo] | the entries contined in the directory
Create a list of `FileInfo` objects representing each entry in the directory at `textURI`, using options `options`.

Directory Traversal
directoryVisit

:: String | `textURI` - string representation of the URI of the directory to visit
-> [FileInfoOptions] | `infoOptions` - options for reading file information
-> [DirectoryVisitOptions] | `visitOptions` - options for visiting the directory
-> DirectoryVisitCallback | `callback` - a function to be called for each entry
-> IO () |
Visit each entry in a directory at a `TextURI`, calling a `DirectoryVisitCallback` for each one.

directoryVisitURI

:: URI | `uri` - the URI of the directory to visit
-> [FileInfoOptions] | `infoOptions` - options for reading file information
-> [DirectoryVisitOptions] | `visitOptions` - options for visiting the directory
-> DirectoryVisitCallback | `callback` - a function to be called for each entry
-> IO () |
Visit each entry in a directory at a `URI`, calling a `DirectoryVisitCallback` for each one.

directoryVisitFiles

:: TextURI | `textURI` - string representation of the URI of the directory to visit
-> [String] | `files` - the files contained in `textURI` to be visited
-> [FileInfoOptions] | `infoOptions` - options for reading file information
-> [DirectoryVisitOptions] | `visitOptions` - options for visiting the directory
-> DirectoryVisitCallback | `callback` - a function to be called for each entry
-> IO () |
Visit each file in a list contained with a directory at a `TextURI`, calling a `DirectoryVisitCallback` for each one.

directoryVisitFilesAtURI

:: URI | `uri` - the `URI` of the directory to visit
-> [String] | `files` - the files contained in `textURI` to be visited
-> [FileInfoOptions] | `infoOptions` - options for reading file information
-> [DirectoryVisitOptions] | `visitOptions` - options for visiting the directory
-> DirectoryVisitCallback | `callback` - a function to be called for each entry
-> IO () |
Visit each file in a list contained with a directory at a `URI`, calling a `DirectoryVisitCallback` for each one.

Produced by Haddock version 2.4.2