Portability | portable (depends on GHC) |
---|---|
Stability | alpha |
Maintainer | gtk2hs-devel@lists.sourceforge.net |
Functions for creating, removing, and accessing directories and their contents.
- data DirectoryHandle
- data DirectoryVisitOptions
- data DirectoryVisitResult
- 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 Source
A handle to an open directory.
data DirectoryVisitOptions Source
Options controlling the way in which a directories are visited.
Bounded DirectoryVisitOptions | |
Enum DirectoryVisitOptions | A callback that will be called for each entry when passed to
The parameters, from left to right, are:
* the path of the visited file, relative to the base directory,
* the 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.
DirectoryVisitStop | stop visiting files |
DirectoryVisitContinue | continue as normal |
DirectoryVisitRecurse | recursively visit the current entry |
Directory Creation
:: TextURI |
|
-> [FilePermissions] |
|
-> IO () |
Create textURI
as a directory. Only succeeds if a file or
directory does not already exist at textURI
.
:: URI |
|
-> [FilePermissions] |
|
-> IO () |
Create uri
as a directory. Only succeeds if a file or
directory does not already exist at uri
.
Directory Removal
Remove the directory at textURI
. The object at textURI
must be an empty directory.
Remove the directory at uri
. The object at uri
must be an empty directory.
Directory Access
:: TextURI |
|
-> [FileInfoOptions] |
|
-> 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.
:: URI |
|
-> [FileInfoOptions] |
|
-> 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.
:: DirectoryHandle |
|
-> IO FileInfo | file information for the next directory entry |
Read the next directory entry from a DirectoryHandle
.
:: TextURI |
|
-> [FileInfoOptions] |
|
-> 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
:: String |
|
-> [FileInfoOptions] |
|
-> [DirectoryVisitOptions] |
|
-> DirectoryVisitCallback |
|
-> IO () |
Visit each entry in a directory at a TextURI
, calling a
DirectoryVisitCallback
for each one.
:: URI |
|
-> [FileInfoOptions] |
|
-> [DirectoryVisitOptions] |
|
-> DirectoryVisitCallback |
|
-> IO () |
Visit each entry in a directory at a URI
, calling a
DirectoryVisitCallback
for each one.
:: TextURI |
|
-> [String] |
|
-> [FileInfoOptions] |
|
-> [DirectoryVisitOptions] |
|
-> DirectoryVisitCallback |
|
-> IO () |
Visit each file in a list contained with a directory at a
TextURI
, calling a DirectoryVisitCallback
for each one.
directoryVisitFilesAtURISource
:: URI |
|
-> [String] |
|
-> [FileInfoOptions] |
|
-> [DirectoryVisitOptions] |
|
-> DirectoryVisitCallback |
|
-> IO () |
Visit each file in a list contained with a directory at a
URI
, calling a DirectoryVisitCallback
for each one.