| Gtk2Hs | Contents | Index

System.Gnome.VFS.Ops

Maintainer | gtk2hs-devel@lists.sourceforge.net Stability : alpha Portability : portable (depends on GHC)

Contents

Types
I/O Operations
Truncation
File Information

Description
Synopsis

data Handle

data Result

= Ok
| ErrorNotFound
| ErrorGeneric
| ErrorInternal
| ErrorBadParameters
| ErrorNotSupported
| ErrorIo
| ErrorCorruptedData
| ErrorWrongFormat
| ErrorBadFile
| ErrorTooBig
| ErrorNoSpace
| ErrorReadOnly
| ErrorInvalidUri
| ErrorNotOpen
| ErrorInvalidOpenMode
| ErrorAccessDenied
| ErrorTooManyOpenFiles
| ErrorEof
| ErrorNotADirectory
| ErrorInProgress
| ErrorInterrupted
| ErrorFileExists
| ErrorLoop
| ErrorNotPermitted
| ErrorIsDirectory
| ErrorNoMemory
| ErrorHostNotFound
| ErrorInvalidHostName
| ErrorHostHasNoAddress
| ErrorLoginFailed
| ErrorCancelled
| ErrorDirectoryBusy
| ErrorDirectoryNotEmpty
| ErrorTooManyLinks
| ErrorReadOnlyFileSystem
| ErrorNotSameFileSystem
| ErrorNameTooLong
| ErrorServiceNotAvailable
| ErrorServiceObsolete
| ErrorProtocolError
| ErrorNoMasterBrowser
| ErrorNoDefault
| ErrorNoHandler
| ErrorParse
| ErrorLaunch
| ErrorTimeout
| ErrorNameserver
| ErrorLocked
| ErrorDeprecatedFunction
| ErrorInvalidFilename
| ErrorNotASymbolicLink
| NumErrors

data OpenMode

= OpenNone
| OpenRead
| OpenWrite
| OpenRandom
| OpenTruncate

data SeekPosition

= SeekStart
| SeekCurrent
| SeekEnd

data FilePermissions

= PermSUID
| PermSGID
| PermSticky
| PermUserRead
| PermUserWrite
| PermUserExec
| PermGroupRead
| PermGroupWrite
| PermGroupExec
| PermOtherRead
| PermOtherWrite
| PermOtherExec
| PermAccessReadable
| PermAccessWritable
| PermAccessExecutable

type FileSize = Word64
type FileOffset = Word64
open :: TextURI -> OpenMode -> IO Handle
openURI :: URI -> OpenMode -> IO Handle
create :: TextURI -> OpenMode -> Bool -> [FilePermissions] -> IO Handle
createURI :: URI -> OpenMode -> Bool -> [FilePermissions] -> IO Handle
close :: Handle -> IO ()
read :: Handle -> FileSize -> IO ByteString
write :: Handle -> ByteString -> IO FileSize
seek :: Handle -> SeekPosition -> FileOffset -> IO ()
tell :: Handle -> IO FileSize
forgetCache :: Handle -> FileOffset -> FileSize -> IO ()
truncate :: String -> FileSize -> IO ()
truncateURI :: URI -> FileSize -> IO ()
truncateHandle :: Handle -> FileSize -> IO ()
getFileInfo :: String -> [FileInfoOptions] -> IO FileInfo
getFileInfoURI :: URI -> [FileInfoOptions] -> IO FileInfo
getFileInfoFromHandle :: Handle -> [FileInfoOptions] -> IO FileInfo
setFileInfo :: String -> FileInfo -> [SetFileInfoMask] -> IO ()
setFileInfoURI :: URI -> FileInfo -> [SetFileInfoMask] -> IO ()

Types
data Handle

A handle to an open file

data Result

The result of a file operation.
Constructors

Ok |
ErrorNotFound |
ErrorGeneric |
ErrorInternal |
ErrorBadParameters |
ErrorNotSupported |
ErrorIo |
ErrorCorruptedData |
ErrorWrongFormat |
ErrorBadFile |
ErrorTooBig |
ErrorNoSpace |
ErrorReadOnly |
ErrorInvalidUri |
ErrorNotOpen |
ErrorInvalidOpenMode |
ErrorAccessDenied |
ErrorTooManyOpenFiles |
ErrorEof |
ErrorNotADirectory |
ErrorInProgress |
ErrorInterrupted |
ErrorFileExists |
ErrorLoop |
ErrorNotPermitted |
ErrorIsDirectory |
ErrorNoMemory |
ErrorHostNotFound |
ErrorInvalidHostName |
ErrorHostHasNoAddress |
ErrorLoginFailed |
ErrorCancelled |
ErrorDirectoryBusy |
ErrorDirectoryNotEmpty |
ErrorTooManyLinks |
ErrorReadOnlyFileSystem |
ErrorNotSameFileSystem |
ErrorNameTooLong |
ErrorServiceNotAvailable |
ErrorServiceObsolete |
ErrorProtocolError |
ErrorNoMasterBrowser |
ErrorNoDefault |
ErrorNoHandler |
ErrorParse |
ErrorLaunch |
ErrorTimeout |
ErrorNameserver |
ErrorLocked |
ErrorDeprecatedFunction |
ErrorInvalidFilename |
ErrorNotASymbolicLink |
NumErrors |

Instances

Bounded Result
Enum Result
Eq Result
Show Result
Typeable Result

data OpenMode

Constructors

OpenNone |
OpenRead |
OpenWrite |
OpenRandom |
OpenTruncate |

Instances

Bounded OpenMode
Enum OpenMode
Eq OpenMode
Show OpenMode

data SeekPosition

Specifies the start position for a seek operation.
Constructors

SeekStart |
SeekCurrent |
SeekEnd |

Instances

Bounded SeekPosition
Enum SeekPosition
Eq SeekPosition
Show SeekPosition

data FilePermissions

UNIX-like permissions for a file.
Constructors

PermSUID |
PermSGID |
PermSticky |
PermUserRead |
PermUserWrite |
PermUserExec |
PermGroupRead |
PermGroupWrite |
PermGroupExec |
PermOtherRead |
PermOtherWrite |
PermOtherExec |
PermAccessReadable |
PermAccessWritable |
PermAccessExecutable |

Instances

Bounded FilePermissions
Enum FilePermissions
Eq FilePermissions
Ord FilePermissions
Read FilePermissions
Show FilePermissions
Flags FilePermissions

type FileSize = Word64
An integral type wide enough to hold the size of a file.
type FileOffset = Word64
An integral type wide enough to hold an offset into a file.
I/O Operations
open

:: TextURI | `textURI` -
-> OpenMode | `openMode` -
-> IO Handle | a handle to the opened file
Open the file at `textURI`.

openURI

:: URI | `uri` -
-> OpenMode | `openMode` -
-> IO Handle | a handle to the opened file
Open the file at `uri`.

create

:: TextURI | `textURI` -
-> OpenMode | `openMode` -
-> Bool | `exclusive` -
-> [FilePermissions] | `perm` -
-> IO Handle | a handle to the created file
Create a file at `textURI`.

createURI

:: URI | `uri` -
-> OpenMode | `openMode` -
-> Bool | `exclusive` -
-> [FilePermissions] | `perm` -
-> IO Handle | a handle to the created file
Create a file at `uri`.

close

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

read

:: Handle | `handle` -
-> FileSize | `bytes` -
-> IO ByteString | the data read from the file
Read data from a file.

write

:: Handle | `handle` -
-> ByteString | `byteString` -
-> IO FileSize | the number of bytes actually written
Write data to a file.

seek

:: Handle | `handle` -
-> SeekPosition | `whence` -
-> FileOffset | `offset` -
-> IO () |
Seek to a position in a file.

tell

:: Handle | `handle` -
-> IO FileSize | the current position in the file
Return the current position in the file.

forgetCache :: Handle -> FileOffset -> FileSize -> IO ()
Free any cache associated with the file opened on `handle`, in the region of `size` bytes starting at `offset`.
Truncation
truncate :: String -> FileSize -> IO ()
Truncate the file at `textURI` to `length` bytes.
truncateURI :: URI -> FileSize -> IO ()
Truncate the file at `uri` to `length` bytes.
truncateHandle :: Handle -> FileSize -> IO ()
Truncate the file opened on `handle` to `length` bytes.
File Information
getFileInfo :: String -> [FileInfoOptions] -> IO FileInfo
Get the file information for the file at `textURI`.
getFileInfoURI :: URI -> [FileInfoOptions] -> IO FileInfo
Get the file information for the file at `uri`.
getFileInfoFromHandle :: Handle -> [FileInfoOptions] -> IO FileInfo
Get the file information for the file opened on `handle`.
setFileInfo :: String -> FileInfo -> [SetFileInfoMask] -> IO ()
Set the file information for the file at `textURI`.
setFileInfoURI :: URI -> FileInfo -> [SetFileInfoMask] -> IO ()
Set the file information for the file at `uri`.
Produced by Haddock version 2.4.2