<refentry id="camel-CamelStreamFs">
<refmeta>
<refentrytitle role="top_of_page" id="camel-CamelStreamFs.top_of_page">CamelStreamFs</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAMEL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>CamelStreamFs</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv id="camel-CamelStreamFs.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
struct              <link linkend="CamelStreamFs">CamelStreamFs</link>;
<link linkend="CamelStream">CamelStream</link> *       <link linkend="camel-stream-fs-new-with-name">camel_stream_fs_new_with_name</link>       (const <link linkend="char">char</link> *name,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="mode-t">mode_t</link> mode);
<link linkend="CamelStream">CamelStream</link> *       <link linkend="camel-stream-fs-new-with-name-and-bounds">camel_stream_fs_new_with_name_and_bounds</link>
                                                        (const <link linkend="char">char</link> *name,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="mode-t">mode_t</link> mode,
                                                         <link linkend="off-t">off_t</link> start,
                                                         <link linkend="off-t">off_t</link> end);
<link linkend="CamelStream">CamelStream</link> *       <link linkend="camel-stream-fs-new-with-fd">camel_stream_fs_new_with_fd</link>         (<link linkend="int">int</link> fd);
<link linkend="CamelStream">CamelStream</link> *       <link linkend="camel-stream-fs-new-with-fd-and-bounds">camel_stream_fs_new_with_fd_and_bounds</link>
                                                        (<link linkend="int">int</link> fd,
                                                         <link linkend="off-t">off_t</link> start,
                                                         <link linkend="off-t">off_t</link> end);
</synopsis>
</refsynopsisdiv>









<refsect1 id="camel-CamelStreamFs.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>

<refsect1 id="camel-CamelStreamFs.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelStreamFs" role="struct">
<title>struct CamelStreamFs</title>
<indexterm zone="CamelStreamFs"><primary sortas="CamelStreamFs">CamelStreamFs</primary></indexterm><programlisting>struct CamelStreamFs {
	CamelSeekableStream parent_object;

	int fd;             /* file descriptor on the underlying file */
};
</programlisting>
<para>
</para></refsect2>
<refsect2 id="camel-stream-fs-new-with-name" role="function">
<title>camel_stream_fs_new_with_name ()</title>
<indexterm zone="camel-stream-fs-new-with-name"><primary sortas="camel_stream_fs_new_with_name">camel_stream_fs_new_with_name</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link> *       camel_stream_fs_new_with_name       (const <link linkend="char">char</link> *name,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="mode-t">mode_t</link> mode);</programlisting>
<para>
Creates a new <link linkend="CamelStreamFs"><type>CamelStreamFs</type></link> corresponding to the named file, flags,
and mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> a local filename
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags as in open(2)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara> a file mode
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new stream, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-stream-fs-new-with-name-and-bounds" role="function">
<title>camel_stream_fs_new_with_name_and_bounds ()</title>
<indexterm zone="camel-stream-fs-new-with-name-and-bounds"><primary sortas="camel_stream_fs_new_with_name_and_bounds">camel_stream_fs_new_with_name_and_bounds</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link> *       camel_stream_fs_new_with_name_and_bounds
                                                        (const <link linkend="char">char</link> *name,
                                                         <link linkend="int">int</link> flags,
                                                         <link linkend="mode-t">mode_t</link> mode,
                                                         <link linkend="off-t">off_t</link> start,
                                                         <link linkend="off-t">off_t</link> end);</programlisting>
<para>
Creates a new CamelStream corresponding to the given arguments.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> a local filename
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags as in open(2)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara> a file mode
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&#160;:</term>
<listitem><simpara> the first valid position in the file
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&#160;:</term>
<listitem><simpara> the first invalid position in the file, or <link linkend="CAMEL-STREAM-UNBOUND--CAPS"><type>CAMEL_STREAM_UNBOUND</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the stream, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-stream-fs-new-with-fd" role="function">
<title>camel_stream_fs_new_with_fd ()</title>
<indexterm zone="camel-stream-fs-new-with-fd"><primary sortas="camel_stream_fs_new_with_fd">camel_stream_fs_new_with_fd</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link> *       camel_stream_fs_new_with_fd         (<link linkend="int">int</link> fd);</programlisting>
<para>
Creates a new fs stream using the given file descriptor <parameter>fd</parameter> as the
backing store. When the stream is destroyed, the file descriptor
will be closed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fd</parameter>&#160;:</term>
<listitem><simpara> a file descriptor
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="CamelStreamFs"><type>CamelStreamFs</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-stream-fs-new-with-fd-and-bounds" role="function">
<title>camel_stream_fs_new_with_fd_and_bounds ()</title>
<indexterm zone="camel-stream-fs-new-with-fd-and-bounds"><primary sortas="camel_stream_fs_new_with_fd_and_bounds">camel_stream_fs_new_with_fd_and_bounds</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link> *       camel_stream_fs_new_with_fd_and_bounds
                                                        (<link linkend="int">int</link> fd,
                                                         <link linkend="off-t">off_t</link> start,
                                                         <link linkend="off-t">off_t</link> end);</programlisting>
<para>
Gets a stream associated with the given file descriptor and bounds.
When the stream is destroyed, the file descriptor will be closed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fd</parameter>&#160;:</term>
<listitem><simpara> a file descriptor
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&#160;:</term>
<listitem><simpara> the first valid position in the file
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&#160;:</term>
<listitem><simpara> the first invalid position in the file, or <link linkend="CAMEL-STREAM-UNBOUND--CAPS"><type>CAMEL_STREAM_UNBOUND</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the bound stream
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
