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

Contents

Description

 

Synopsis

Types

data Handle Source

A handle to an open file

data SeekPosition Source

Specifies the start position for a seek operation.

Constructors

SeekStart 
SeekCurrent 
SeekEnd 

type FileSize = Word64Source

An integral type wide enough to hold the size of a file.

type FileOffset = Word64Source

An integral type wide enough to hold an offset into a file.

I/O Operations

openSource

Arguments

:: TextURI

textURI -

-> OpenMode

openMode -

-> IO Handle

a handle to the opened file

Open the file at textURI.

openURISource

Arguments

:: URI

uri -

-> OpenMode

openMode -

-> IO Handle

a handle to the opened file

Open the file at uri.

createSource

Arguments

:: TextURI

textURI -

-> OpenMode

openMode -

-> Bool

exclusive -

-> [FilePermissions]

perm -

-> IO Handle

a handle to the created file

Create a file at textURI.

createURISource

Arguments

:: URI

uri -

-> OpenMode

openMode -

-> Bool

exclusive -

-> [FilePermissions]

perm -

-> IO Handle

a handle to the created file

Create a file at uri.

closeSource

Arguments

:: Handle

handle -

-> IO () 

Close a Handle.

seekSource

Arguments

:: Handle

handle -

-> SeekPosition

whence -

-> FileOffset

offset -

-> IO () 

Seek to a position in a file.

tellSource

Arguments

:: Handle

handle -

-> IO FileSize

the current position in the file

Return the current position in the file.

forgetCache :: Handle -> FileOffset -> FileSize -> IO ()Source

Free any cache associated with the file opened on handle, in the region of size bytes starting at offset.

Truncation

truncate :: String -> FileSize -> IO ()Source

Truncate the file at textURI to length bytes.

truncateURI :: URI -> FileSize -> IO ()Source

Truncate the file at uri to length bytes.

truncateHandle :: Handle -> FileSize -> IO ()Source

Truncate the file opened on handle to length bytes.

File Information

getFileInfo :: String -> [FileInfoOptions] -> IO FileInfoSource

Get the file information for the file at textURI.

getFileInfoURI :: URI -> [FileInfoOptions] -> IO FileInfoSource

Get the file information for the file at uri.

getFileInfoFromHandle :: Handle -> [FileInfoOptions] -> IO FileInfoSource

Get the file information for the file opened on handle.

setFileInfo :: String -> FileInfo -> [SetFileInfoMask] -> IO ()Source

Set the file information for the file at textURI.

setFileInfoURI :: URI -> FileInfo -> [SetFileInfoMask] -> IO ()Source

Set the file information for the file at uri.