gnomevfs-0.11.0: Binding to the GNOME Virtual File System library.

Portabilityportable (depends on GHC)
Stabilityalpha
Maintainergtk2hs-devel@lists.sourceforge.net

System.Gnome.VFS.Directory

Contents

Description

Functions for creating, removing, and accessing directories and their contents.

Synopsis

Types

data DirectoryHandle Source

A handle to an open directory.

data DirectoryVisitOptions Source

Options controlling the way in which a directories are visited.

Instances

Bounded DirectoryVisitOptions 
Enum DirectoryVisitOptions

A callback that will be called for each entry when passed to directoryVisit, directoryVisitURI, directoryVisitFiles, or directoryVisitFilesAtURI.

The parameters, from left to right, are: * the path of the visited file, relative to the base directory, * the FileInfo for the visited file, * True if returning DirectoryVisitRecurse will cause a loop, otherwise False.

The callback must return the next action to be taken.

Eq DirectoryVisitOptions 
Show DirectoryVisitOptions 
Flags DirectoryVisitOptions 

data DirectoryVisitResult Source

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

Directory Creation

makeDirectorySource

Arguments

:: 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.

makeDirectoryForURISource

Arguments

:: 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

removeDirectorySource

Arguments

:: TextURI

textURI - URI of the directory to be removed

-> IO () 

Remove the directory at textURI. The object at textURI must be an empty directory.

removeDirectoryFromURISource

Arguments

:: 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

directoryOpenSource

Arguments

:: 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.

directoryOpenFromURISource

Arguments

:: 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.

directoryReadNextSource

Arguments

:: DirectoryHandle

handle - a directory handle

-> IO FileInfo

file information for the next directory entry

Read the next directory entry from a DirectoryHandle.

directoryCloseSource

Arguments

:: DirectoryHandle

handle - a directory handle

-> IO () 

Close a DirectoryHandle.

directoryListLoadSource

Arguments

:: 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

directoryVisitSource

Arguments

:: 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.

directoryVisitURISource

Arguments

:: 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.

directoryVisitFilesSource

Arguments

:: 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.

directoryVisitFilesAtURISource

Arguments

:: 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.