gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.FileOutputStream

Description

GFileOutputStream provides output streams that write their content to a file.

GFileOutputStream implements Seekable, which allows the output stream to jump to arbitrary positions in the file and to truncate the file, provided the filesystem of the file supports these operations.

To find the position of a file output stream, use seekableTell. To find out if a file output stream supports seeking, use seekableCanSeek.To position a file output stream, use seekableSeek. To find out if a file output stream supports truncating, use seekableCanTruncate. To truncate a file output stream, use seekableTruncate.

Synopsis

Exported types

newtype FileOutputStream Source #

Memory-managed wrapper type.

Instances

Instances details
Eq FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

GObject FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

ManagedPtrNewtype FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

TypedObject FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

Methods

glibType :: IO GType #

HasParentTypes FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

HasAttributeList FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

(info ~ ResolveFileOutputStreamMethod t FileOutputStream, OverloadedMethod info FileOutputStream p, HasField t FileOutputStream p) => HasField (t :: Symbol) FileOutputStream (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

Methods

getField :: FileOutputStream -> p #

(info ~ ResolveFileOutputStreamMethod t FileOutputStream, OverloadedMethodInfo info FileOutputStream) => IsLabel t (MethodProxy info FileOutputStream) Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

(info ~ ResolveFileOutputStreamMethod t FileOutputStream, OverloadedMethod info FileOutputStream p) => IsLabel t (FileOutputStream -> p) Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

IsGValue (Maybe FileOutputStream) Source #

Convert FileOutputStream to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.FileOutputStream

type AttributeList FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

type ParentTypes FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

type SignalList FileOutputStream Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

class (GObject o, IsDescendantOf FileOutputStream o) => IsFileOutputStream o Source #

Type class for types which can be safely cast to FileOutputStream, for instance with toFileOutputStream.

Instances

Instances details
(GObject o, IsDescendantOf FileOutputStream o) => IsFileOutputStream o Source # 
Instance details

Defined in GI.Gio.Objects.FileOutputStream

toFileOutputStream :: (MonadIO m, IsFileOutputStream o) => o -> m FileOutputStream Source #

Cast to FileOutputStream, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveFileOutputStreamMethod (t :: Symbol) o where ... Source #

Equations

ResolveFileOutputStreamMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveFileOutputStreamMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveFileOutputStreamMethod "canSeek" o = SeekableCanSeekMethodInfo 
ResolveFileOutputStreamMethod "canTruncate" o = SeekableCanTruncateMethodInfo 
ResolveFileOutputStreamMethod "clearPending" o = OutputStreamClearPendingMethodInfo 
ResolveFileOutputStreamMethod "close" o = OutputStreamCloseMethodInfo 
ResolveFileOutputStreamMethod "closeAsync" o = OutputStreamCloseAsyncMethodInfo 
ResolveFileOutputStreamMethod "closeFinish" o = OutputStreamCloseFinishMethodInfo 
ResolveFileOutputStreamMethod "flush" o = OutputStreamFlushMethodInfo 
ResolveFileOutputStreamMethod "flushAsync" o = OutputStreamFlushAsyncMethodInfo 
ResolveFileOutputStreamMethod "flushFinish" o = OutputStreamFlushFinishMethodInfo 
ResolveFileOutputStreamMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveFileOutputStreamMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveFileOutputStreamMethod "getv" o = ObjectGetvMethodInfo 
ResolveFileOutputStreamMethod "hasPending" o = OutputStreamHasPendingMethodInfo 
ResolveFileOutputStreamMethod "isClosed" o = OutputStreamIsClosedMethodInfo 
ResolveFileOutputStreamMethod "isClosing" o = OutputStreamIsClosingMethodInfo 
ResolveFileOutputStreamMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveFileOutputStreamMethod "notify" o = ObjectNotifyMethodInfo 
ResolveFileOutputStreamMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveFileOutputStreamMethod "queryInfo" o = FileOutputStreamQueryInfoMethodInfo 
ResolveFileOutputStreamMethod "queryInfoAsync" o = FileOutputStreamQueryInfoAsyncMethodInfo 
ResolveFileOutputStreamMethod "queryInfoFinish" o = FileOutputStreamQueryInfoFinishMethodInfo 
ResolveFileOutputStreamMethod "ref" o = ObjectRefMethodInfo 
ResolveFileOutputStreamMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveFileOutputStreamMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveFileOutputStreamMethod "seek" o = SeekableSeekMethodInfo 
ResolveFileOutputStreamMethod "splice" o = OutputStreamSpliceMethodInfo 
ResolveFileOutputStreamMethod "spliceAsync" o = OutputStreamSpliceAsyncMethodInfo 
ResolveFileOutputStreamMethod "spliceFinish" o = OutputStreamSpliceFinishMethodInfo 
ResolveFileOutputStreamMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveFileOutputStreamMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveFileOutputStreamMethod "tell" o = SeekableTellMethodInfo 
ResolveFileOutputStreamMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveFileOutputStreamMethod "truncate" o = SeekableTruncateMethodInfo 
ResolveFileOutputStreamMethod "unref" o = ObjectUnrefMethodInfo 
ResolveFileOutputStreamMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveFileOutputStreamMethod "write" o = OutputStreamWriteMethodInfo 
ResolveFileOutputStreamMethod "writeAll" o = OutputStreamWriteAllMethodInfo 
ResolveFileOutputStreamMethod "writeAllAsync" o = OutputStreamWriteAllAsyncMethodInfo 
ResolveFileOutputStreamMethod "writeAllFinish" o = OutputStreamWriteAllFinishMethodInfo 
ResolveFileOutputStreamMethod "writeAsync" o = OutputStreamWriteAsyncMethodInfo 
ResolveFileOutputStreamMethod "writeBytes" o = OutputStreamWriteBytesMethodInfo 
ResolveFileOutputStreamMethod "writeBytesAsync" o = OutputStreamWriteBytesAsyncMethodInfo 
ResolveFileOutputStreamMethod "writeBytesFinish" o = OutputStreamWriteBytesFinishMethodInfo 
ResolveFileOutputStreamMethod "writeFinish" o = OutputStreamWriteFinishMethodInfo 
ResolveFileOutputStreamMethod "writev" o = OutputStreamWritevMethodInfo 
ResolveFileOutputStreamMethod "writevAll" o = OutputStreamWritevAllMethodInfo 
ResolveFileOutputStreamMethod "writevAllAsync" o = OutputStreamWritevAllAsyncMethodInfo 
ResolveFileOutputStreamMethod "writevAllFinish" o = OutputStreamWritevAllFinishMethodInfo 
ResolveFileOutputStreamMethod "writevAsync" o = OutputStreamWritevAsyncMethodInfo 
ResolveFileOutputStreamMethod "writevFinish" o = OutputStreamWritevFinishMethodInfo 
ResolveFileOutputStreamMethod "getData" o = ObjectGetDataMethodInfo 
ResolveFileOutputStreamMethod "getEtag" o = FileOutputStreamGetEtagMethodInfo 
ResolveFileOutputStreamMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveFileOutputStreamMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveFileOutputStreamMethod "setData" o = ObjectSetDataMethodInfo 
ResolveFileOutputStreamMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveFileOutputStreamMethod "setPending" o = OutputStreamSetPendingMethodInfo 
ResolveFileOutputStreamMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveFileOutputStreamMethod l o = MethodResolutionFailed l o :: Type 

getEtag

fileOutputStreamGetEtag Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileOutputStream a) 
=> a

stream: a FileOutputStream.

-> m (Maybe Text)

Returns: the entity tag for the stream.

Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing.

queryInfo

fileOutputStreamQueryInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileOutputStream a, IsCancellable b) 
=> a

stream: a FileOutputStream.

-> Text

attributes: a file attribute query string.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m FileInfo

Returns: a FileInfo for the stream, or Nothing on error. (Can throw GError)

Queries a file output stream for the given attributes. This function blocks while querying the stream. For the asynchronous version of this function, see fileOutputStreamQueryInfoAsync. While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with IOErrorEnumPending.

Can fail if the stream was already closed (with error being set to IOErrorEnumClosed), the stream has pending operations (with error being set to IOErrorEnumPending), or if querying info is not supported for the stream's interface (with error being set to IOErrorEnumNotSupported). In all cases of failure, Nothing will be returned.

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, and Nothing will be returned.

queryInfoAsync

fileOutputStreamQueryInfoAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileOutputStream a, IsCancellable b) 
=> a

stream: a FileOutputStream.

-> Text

attributes: a file attribute query string.

-> Int32

ioPriority: the I/O priority of the request

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: callback to call when the request is satisfied

-> m () 

Asynchronously queries the stream for a FileInfo. When completed, callback will be called with a AsyncResult which can be used to finish the operation with fileOutputStreamQueryInfoFinish.

For the synchronous version of this function, see fileOutputStreamQueryInfo.

queryInfoFinish

fileOutputStreamQueryInfoFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileOutputStream a, IsAsyncResult b) 
=> a

stream: a FileOutputStream.

-> b

result: a AsyncResult.

-> m FileInfo

Returns: A FileInfo for the finished query. (Can throw GError)

Finalizes the asynchronous query started by fileOutputStreamQueryInfoAsync.