CamelStreamFs: Camel Reference Manual

## CamelStreamFs CamelStreamFs |

## Functions

CamelStream * | camel_stream_fs_new_with_name ()
CamelStream * | camel_stream_fs_new_with_fd ()
gint | camel_stream_fs_get_fd ()

## Object Hierarchy

        GObject
        ╰── CamelStream
            ╰── CamelStreamFs

## Description

## Functions

### camel_stream_fs_new_with_name ()

    CamelStream *
    camel_stream_fs_new_with_name (const gchar *name,
                                   gint flags,
                                   mode_t mode,
                                   GError **error);

Creates a new CamelStreamFs corresponding to the named file, flags, and mode.

#### Parameters

name | a local filename |
flags | flags as in open(2) |
mode | a file mode. | [type guint32]
error | return location for a GError, or `NULL` |

#### Returns

the new stream, or `NULL` on error.

### camel_stream_fs_new_with_fd ()

    CamelStream *
    camel_stream_fs_new_with_fd (gint fd);

Creates a new fs stream using the given file descriptor `fd` as the backing store. When the stream is destroyed, the file descriptor will be closed.

#### Parameters

fd | a file descriptor |

#### Returns

a new CamelStreamFs

### camel_stream_fs_get_fd ()

    gint
    camel_stream_fs_get_fd (CamelStreamFs *stream);

#### Parameters

stream | a CamelStream |

Since: 2.32