<refentry id="gnome-vfs-20-gnome-vfs-file-advanced-ops">
<refmeta>
<refentrytitle id="top_of_page">Advanced File Operations</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Advanced File Operations</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="synopsis">
<title id="synopsis.title">Synopsis</title>

<synopsis>



<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-file-control">gnome_vfs_file_control</link>       (<link linkend="GnomeVFSHandle">GnomeVFSHandle</link> *handle,
                                             const <link linkend="char">char</link> *operation,
                                             <link linkend="gpointer">gpointer</link> operation_data);
<link linkend="GnomeVFSResult">GnomeVFSResult</link> <link linkend="gnome-vfs-forget-cache">gnome_vfs_forget_cache</link>       (<link linkend="GnomeVFSHandle">GnomeVFSHandle</link> *handle,
                                             <link linkend="GnomeVFSFileOffset">GnomeVFSFileOffset</link> offset,
                                             <link linkend="GnomeVFSFileSize">GnomeVFSFileSize</link> size);
</synopsis>
</refsynopsisdiv>









<refsect1 id="desc">
<title id="desc.title">Description</title>
<para>
   
</para>
</refsect1>

<refsect1 id="details">
<title id="details.title">Details</title>
<refsect2>
<title><anchor id="gnome-vfs-file-control" role="function"/>gnome_vfs_file_control ()</title>
<indexterm><primary>gnome_vfs_file_control</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_file_control       (<link linkend="GnomeVFSHandle">GnomeVFSHandle</link> *handle,
                                             const <link linkend="char">char</link> *operation,
                                             <link linkend="gpointer">gpointer</link> operation_data);</programlisting>
<para>
Execute a backend dependent operation specified by the string <parameter>operation</parameter>.
This is typically used for specialized vfs backends that need additional
operations that gnome-vfs doesn't have. Compare it to the unix call <link linkend="ioctl"><function>ioctl()</function></link>.
The format of <parameter>operation_data</parameter> depends on the operation. Operation that are
backend specific are normally namespaced by their module name.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> handle of the file to affect.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>operation</parameter>&nbsp;:</term>
<listitem><simpara> operation to execute.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>operation_data</parameter>&nbsp;:</term>
<listitem><simpara> data needed to execute the operation.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the success of the operation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-forget-cache" role="function" condition="since:2.12"/>gnome_vfs_forget_cache ()</title>
<indexterm role="2.12"><primary>gnome_vfs_forget_cache</primary></indexterm><programlisting><link linkend="GnomeVFSResult">GnomeVFSResult</link> gnome_vfs_forget_cache       (<link linkend="GnomeVFSHandle">GnomeVFSHandle</link> *handle,
                                             <link linkend="GnomeVFSFileOffset">GnomeVFSFileOffset</link> offset,
                                             <link linkend="GnomeVFSFileSize">GnomeVFSFileSize</link> size);</programlisting>
<para>
With this call you can announce to gnome-vfs that you will no longer
use the region of data starting at <parameter>offset</parameter> with the size of <parameter>size</parameter>. Any
cached data for this region might then be freed.
</para>
<para>
This might be useful if you stream large files, for example.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> handle of the file to affect.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara> start point of the region to be freed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> length of the region to be freed (or until the end of the
file if 0 is specified).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an integer representing the result of the operation.

</simpara></listitem></varlistentry>
</variablelist><para>Since  2.12
</para></refsect2>

</refsect1>




</refentry>
