MirageFileStream: libMirage Reference Manual

## MirageFileStream MirageFileStream — File I/O stream object. |

## Functions

gboolean | mirage_file_stream_open ()

## Types and Values

struct | MirageFileStream
struct | MirageFileStreamClass

## Object Hierarchy

        GObject
        ╰── MirageObject
            ╰── MirageFileStream

## Implemented Interfaces

MirageFileStream implements MirageContextual and MirageStream.

## Includes

    #include <mirage-file-stream.h>

## Description

MirageFileStream is a basic unit of file access abstraction used in libMirage. It implements MirageStream interface to perform I/O operations.

A MirageFileStream is found at the bottom of all filter chains used by libMirage's image parsers and writers.

## Functions

### mirage_file_stream_open ()

    gboolean
    mirage_file_stream_open (MirageFileStream *self,
                             const gchar *filename,
                             gboolean writable,
                             GError **error);

Opens the stream on the file pointed to by `filename` . If `writable` is `FALSE`, the stream is opened in read-only mode; if `writable` is `TRUE`, the stream is opened in read-write mode.

#### Parameters

self | a MirageFileStream |
filename | name of file on which the stream is to be opened. | [in]
writable | a boolean indicating whether stream should be opened for read/write access. | [in]
error | location to store error, or `NULL`. | [out][allow-none]

#### Returns

`TRUE` on success, `FALSE` on failure.

## Types and Values

### struct MirageFileStream

    struct MirageFileStream;

All the fields in the MirageFileStream structure are private to the MirageFileStream implementation and should never be accessed directly.

### struct MirageFileStreamClass

    struct MirageFileStreamClass {
        MirageObjectClass parent_class;
    };

The class structure for the MirageFileStream type.

#### Members

## See Also

MirageStream, MirageFilterStream