Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GFileInputStream provides input streams that take their content from a file.
GFileInputStream implements Seekable
, which allows the input
stream to jump to arbitrary positions in the file, provided the
filesystem of the file allows it. To find the position of a file
input stream, use seekableTell
. To find out if a file input
stream supports seeking, use seekableCanSeek
.
To position a file input stream, use seekableSeek
.
Synopsis
- newtype FileInputStream = FileInputStream (ManagedPtr FileInputStream)
- class (GObject o, IsDescendantOf FileInputStream o) => IsFileInputStream o
- toFileInputStream :: (MonadIO m, IsFileInputStream o) => o -> m FileInputStream
- fileInputStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo
- fileInputStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- fileInputStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileInputStream a, IsAsyncResult b) => a -> b -> m FileInfo
Exported types
newtype FileInputStream Source #
Memory-managed wrapper type.
Instances
Eq FileInputStream Source # | |
Defined in GI.Gio.Objects.FileInputStream (==) :: FileInputStream -> FileInputStream -> Bool # (/=) :: FileInputStream -> FileInputStream -> Bool # | |
GObject FileInputStream Source # | |
Defined in GI.Gio.Objects.FileInputStream | |
ManagedPtrNewtype FileInputStream Source # | |
Defined in GI.Gio.Objects.FileInputStream | |
TypedObject FileInputStream Source # | |
Defined in GI.Gio.Objects.FileInputStream | |
HasParentTypes FileInputStream Source # | |
Defined in GI.Gio.Objects.FileInputStream | |
IsGValue (Maybe FileInputStream) Source # | Convert |
Defined in GI.Gio.Objects.FileInputStream gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe FileInputStream -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe FileInputStream) # | |
type ParentTypes FileInputStream Source # | |
Defined in GI.Gio.Objects.FileInputStream |
class (GObject o, IsDescendantOf FileInputStream o) => IsFileInputStream o Source #
Type class for types which can be safely cast to FileInputStream
, for instance with toFileInputStream
.
Instances
(GObject o, IsDescendantOf FileInputStream o) => IsFileInputStream o Source # | |
Defined in GI.Gio.Objects.FileInputStream |
toFileInputStream :: (MonadIO m, IsFileInputStream o) => o -> m FileInputStream Source #
Cast to FileInputStream
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, canSeek, canTruncate, clearPending, close, closeAsync, closeFinish, forceFloating, freezeNotify, getv, hasPending, isClosed, isFloating, notify, notifyByPspec, queryInfo, queryInfoAsync, queryInfoFinish, read, readAll, readAllAsync, readAllFinish, readAsync, readBytes, readBytesAsync, readBytesFinish, readFinish, ref, refSink, runDispose, seek, skip, skipAsync, skipFinish, stealData, stealQdata, tell, thawNotify, truncate, unref, watchClosure.
Getters
getData, getProperty, getQdata.
Setters
queryInfo
fileInputStreamQueryInfo Source #
:: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m FileInfo | Returns: a |
Queries a file input stream the given attributes
. This function blocks
while querying the stream. For the asynchronous (non-blocking) version
of this function, see fileInputStreamQueryInfoAsync
. While the
stream is blocked, the stream will set the pending flag internally, and
any other operations on the stream will fail with IOErrorEnumPending
.
queryInfoAsync
fileInputStreamQueryInfoAsync Source #
:: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Queries the stream information asynchronously.
When the operation is finished callback
will be called.
You can then call fileInputStreamQueryInfoFinish
to get the result of the operation.
For the synchronous version of this function,
see fileInputStreamQueryInfo
.
If cancellable
is not Nothing
, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error IOErrorEnumCancelled
will be set
queryInfoFinish
fileInputStreamQueryInfoFinish Source #
:: (HasCallStack, MonadIO m, IsFileInputStream a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m FileInfo |
Finishes an asynchronous info query operation.