<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>glibmm: Gio::FileEnumerator Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"> <ul> <li><a class="el" href="namespaceGio.html">Gio</a> </li> <li><a class="el" href="classGio_1_1FileEnumerator.html">FileEnumerator</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#related">Related Functions</a> </div> <div class="headertitle"> <h1>Gio::FileEnumerator Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="Gio::FileEnumerator" --><!-- doxytag: inherits="Glib::Object" --> <p>Enumerated Files Routines. <a href="#_details">More...</a></p> <p><code>#include <giomm/fileenumerator.h></code></p> <!-- startSectionHeader --><div class="dynheader"> Inheritance diagram for Gio::FileEnumerator:<!-- endSectionHeader --></div> <!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent"> <div class="center"><img src="classGio_1_1FileEnumerator__inherit__graph.png" border="0" usemap="#Gio_1_1FileEnumerator_inherit__map" alt="Inheritance graph"/></div> <map name="Gio_1_1FileEnumerator_inherit__map" id="Gio_1_1FileEnumerator_inherit__map"> <area shape="rect" id="node2" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="32,160,125,189"/><area shape="rect" id="node4" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="16,83,141,112"/><area shape="rect" id="node6" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="21,5,136,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div> <p><a href="classGio_1_1FileEnumerator-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#aa67510ecc9ddfbb3ef6f1d7ad560ca3f">~FileEnumerator</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GFileEnumerator* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a7c4e1d7258796a85d5b473e08168bd8c">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a7c4e1d7258796a85d5b473e08168bd8c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GFileEnumerator* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#aa54f2d24a93f78b20fa9c33913c862fd">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#aa54f2d24a93f78b20fa9c33913c862fd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">GFileEnumerator* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#ac744c1c54800fb3764ea6ce5546f7937">gobj_copy</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#ac744c1c54800fb3764ea6ce5546f7937"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1FileInfo.html">FileInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a73b5814cb108be591316cedabe362800">next_file</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& cancellable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns information for the next file in the enumerated object. <a href="#a73b5814cb108be591316cedabe362800"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1FileInfo.html">FileInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a881873317d4a608d06405b3da3940e5a">next_file</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a731c5e104949ecd082bcd6a2ada25641">close</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& cancellable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Releases all resources used by this enumerator, making the enumerator return IO_ERROR_CLOSED on all calls. <a href="#a731c5e104949ecd082bcd6a2ada25641"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#ad3729d377a08f39e3f4fc44d5c37409f">close</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Releases all resources used by this enumerator, making the enumerator throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED on all calls. <a href="#ad3729d377a08f39e3f4fc44d5c37409f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a78de4d8a6a97cc68fc236a69a730f033">next_files_async</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a>& slot, const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& cancellable, int num_files=1, int io_priority=Glib::PRIORITY_DEFAULT)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Request information for a number of files from the enumerator asynchronously. <a href="#a78de4d8a6a97cc68fc236a69a730f033"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#ad51d86fbf6ebef0aed7f4321e1df6e79">next_files_async</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a>& slot, int num_files=1, int io_priority=Glib::PRIORITY_DEFAULT)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Request information for a number of files from the enumerator asynchronously. <a href="#ad51d86fbf6ebef0aed7f4321e1df6e79"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ListHandle.html">Glib::ListHandle</a>< <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/> < <a class="el" href="classGio_1_1FileInfo.html">FileInfo</a> > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#ab012d7f4428713efadbd10571f314973">next_files_finish</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AsyncResult.html">AsyncResult</a> >& result)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). <a href="#ab012d7f4428713efadbd10571f314973"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a0c878331956c2b28d749f561dbf84287">close_async</a> (int io_priority, const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& cancellable, const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a>& slot)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Asynchronously closes the file enumerator. <a href="#a0c878331956c2b28d749f561dbf84287"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#aab848a136da3b0880f23e9084544e4ae">close_async</a> (int io_priority, const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a>& slot)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Asynchronously closes the file enumerator. <a href="#aab848a136da3b0880f23e9084544e4ae"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a8f87519e9368a1db2399c24649976057">close_finish</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AsyncResult.html">AsyncResult</a> >& result)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Finishes closing a file enumerator, started from g_file_enumerator_close_async(). <a href="#a8f87519e9368a1db2399c24649976057"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a3908b180f25ff93b1cb6cb86945981a1">is_closed</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if the file enumerator has been closed. <a href="#a3908b180f25ff93b1cb6cb86945981a1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a3e1fb2fb2a8f8916929506828ded33b8">has_pending</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if the file enumerator has pending operations. <a href="#a3e1fb2fb2a8f8916929506828ded33b8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a666470d02974350df0ed75f94321eaae">set_pending</a> (bool pending=true)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the file enumerator as having pending operations. <a href="#a666470d02974350df0ed75f94321eaae"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1File.html">File</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a3ad9348edd27ff536e61ee6b87b0fd23">get_container</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> container which is being enumerated. <a href="#a3ad9348edd27ff536e61ee6b87b0fd23"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< const <a class="el" href="classGio_1_1File.html">File</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#a639025c665bfef49b88902d16b889ec9">get_container</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> container which is being enumerated. <a href="#a639025c665bfef49b88902d16b889ec9"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="related"></a> Related Functions</h2></td></tr> <tr><td colspan="2"><p>(Note that these are not member functions.) </p> <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1FileEnumerator.html">Gio::FileEnumerator</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileEnumerator.html#aba2d802d7865e00771c69e44da54318a">wrap</a> (GFileEnumerator* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#aba2d802d7865e00771c69e44da54318a"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Enumerated Files Routines. </p> <p><a class="el" href="classGio_1_1FileEnumerator.html" title="Enumerated Files Routines.">FileEnumerator</a> allows you to operate on a set of Gio::Files, returning a <a class="el" href="classGio_1_1FileInfo.html" title="FileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.">Gio::FileInfo</a> instance for each file enumerated (e.g. <a class="el" href="classGio_1_1File.html#a68c3afcddc0d4860aa2afb4bf715bb20" title="Gets the requested information about the files in a directory.">Gio::File::enumerate_children()</a> will return a <a class="el" href="classGio_1_1FileEnumerator.html" title="Enumerated Files Routines.">FileEnumerator</a> for each of the children within a directory).</p> <p>To get the next file's information from a <a class="el" href="classGio_1_1FileEnumerator.html" title="Enumerated Files Routines.">Gio::FileEnumerator</a>, use <a class="el" href="classGio_1_1FileEnumerator.html#a881873317d4a608d06405b3da3940e5a">next_file()</a> or its asynchronous version, next_file_async(). Note that the asynchronous version will return a list of Gio::FileInfos, whereas the synchronous version will only return the next file in the enumerator.</p> <p>To close a <a class="el" href="classGio_1_1FileEnumerator.html" title="Enumerated Files Routines.">Gio::FileEnumerator</a>, use <a class="el" href="classGio_1_1FileEnumerator.html#ad3729d377a08f39e3f4fc44d5c37409f" title="Releases all resources used by this enumerator, making the enumerator throw a Gio::Error with CLOSED ...">FileEnumerator::close()</a>, or its asynchronous version, <a class="el" href="classGio_1_1FileEnumerator.html#a0c878331956c2b28d749f561dbf84287" title="Asynchronously closes the file enumerator.">close_async()</a>. Once a <a class="el" href="classGio_1_1FileEnumerator.html" title="Enumerated Files Routines.">FileEnumerator</a> is closed, no further actions may be performed on it.</p> <dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000026">Since glibmm 2.16:</a></b></dt><dd></dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="aa67510ecc9ddfbb3ef6f1d7ad560ca3f"></a><!-- doxytag: member="Gio::FileEnumerator::~FileEnumerator" ref="aa67510ecc9ddfbb3ef6f1d7ad560ca3f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gio::FileEnumerator::~FileEnumerator </td> <td>(</td> <td class="paramname"> )</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a731c5e104949ecd082bcd6a2ada25641"></a><!-- doxytag: member="Gio::FileEnumerator::close" ref="a731c5e104949ecd082bcd6a2ada25641" args="(const Glib::RefPtr< Cancellable > &cancellable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileEnumerator::close </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& </td> <td class="paramname"> <em>cancellable</em> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Releases all resources used by this enumerator, making the enumerator return IO_ERROR_CLOSED on all calls. </p> <p>This will be automatically called when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cancellable</td><td>Optional <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object, <code>0</code> to ignore. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>#<code>true</code> on success or #<code>false</code> on error. </dd></dl> </div> </div> <a class="anchor" id="ad3729d377a08f39e3f4fc44d5c37409f"></a><!-- doxytag: member="Gio::FileEnumerator::close" ref="ad3729d377a08f39e3f4fc44d5c37409f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileEnumerator::close </td> <td>(</td> <td class="paramname"> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Releases all resources used by this enumerator, making the enumerator throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED on all calls. </p> <p>This will be automatically called when the last reference is dropped, but you might want to call this method to make sure resources are released as early as possible. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>#<code>true</code> on success or an empty RefPtr on error. </dd></dl> </div> </div> <a class="anchor" id="a0c878331956c2b28d749f561dbf84287"></a><!-- doxytag: member="Gio::FileEnumerator::close_async" ref="a0c878331956c2b28d749f561dbf84287" args="(int io_priority, const Glib::RefPtr< Cancellable > &cancellable, const SlotAsyncReady &slot)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileEnumerator::close_async </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>io_priority</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& </td> <td class="paramname"> <em>cancellable</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a> & </td> <td class="paramname"> <em>slot</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Asynchronously closes the file enumerator. </p> <p>See <a class="el" href="classGio_1_1FileEnumerator.html#ad3729d377a08f39e3f4fc44d5c37409f" title="Releases all resources used by this enumerator, making the enumerator throw a Gio::Error with CLOSED ...">close()</a>, which is the synchronous version of this function.</p> <p>The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CANCELLED will be thrown by <a class="el" href="classGio_1_1FileEnumerator.html#a8f87519e9368a1db2399c24649976057" title="Finishes closing a file enumerator, started from g_file_enumerator_close_async().">close_finish()</a>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">io_priority</td><td>The I/O priority of the request. </td></tr> <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object which can be used to cancel the operation. </td></tr> <tr><td class="paramname">slot</td><td>A callback to call when the request is satisfied. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="aab848a136da3b0880f23e9084544e4ae"></a><!-- doxytag: member="Gio::FileEnumerator::close_async" ref="aab848a136da3b0880f23e9084544e4ae" args="(int io_priority, const SlotAsyncReady &slot)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileEnumerator::close_async </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>io_priority</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a> & </td> <td class="paramname"> <em>slot</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Asynchronously closes the file enumerator. </p> <p>See <a class="el" href="classGio_1_1FileEnumerator.html#ad3729d377a08f39e3f4fc44d5c37409f" title="Releases all resources used by this enumerator, making the enumerator throw a Gio::Error with CLOSED ...">close()</a>, which is the synchronous version of this function.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">io_priority</td><td>The I/O priority of the request. </td></tr> <tr><td class="paramname">slot</td><td>A callback to call when the request is satisfied. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a8f87519e9368a1db2399c24649976057"></a><!-- doxytag: member="Gio::FileEnumerator::close_finish" ref="a8f87519e9368a1db2399c24649976057" args="(const Glib::RefPtr< AsyncResult > &result)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileEnumerator::close_finish </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AsyncResult.html">AsyncResult</a> >& </td> <td class="paramname"> <em>result</em> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Finishes closing a file enumerator, started from g_file_enumerator_close_async(). </p> <p>If the file enumerator was already closed when g_file_enumerator_close_async() was called, then this function will throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED, and return <code>false</code>. If the file enumerator had pending operation when the close operation was started, then this function will throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with PENDING, and return <code>false</code>. The operation may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CANCELLED will be thrown, and <code>false</code> will be returned. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">result</td><td>A <a class="el" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results.">AsyncResult</a>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the close operation has finished successfully. </dd></dl> </div> </div> <a class="anchor" id="a3ad9348edd27ff536e61ee6b87b0fd23"></a><!-- doxytag: member="Gio::FileEnumerator::get_container" ref="a3ad9348edd27ff536e61ee6b87b0fd23" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>> Gio::FileEnumerator::get_container </td> <td>(</td> <td class="paramname"> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> container which is being enumerated. </p> <dl class="since_2_18"><dt><b><a class="el" href="since_2_18.html#_since_2_18000021">Since glibmm 2.18:</a></b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> which is being enumerated. </dd></dl> </div> </div> <a class="anchor" id="a639025c665bfef49b88902d16b889ec9"></a><!-- doxytag: member="Gio::FileEnumerator::get_container" ref="a639025c665bfef49b88902d16b889ec9" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><const <a class="el" href="classGio_1_1File.html">File</a>> Gio::FileEnumerator::get_container </td> <td>(</td> <td class="paramname"> )</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> container which is being enumerated. </p> <dl class="since_2_18"><dt><b><a class="el" href="since_2_18.html#_since_2_18000022">Since glibmm 2.18:</a></b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> which is being enumerated. </dd></dl> </div> </div> <a class="anchor" id="aa54f2d24a93f78b20fa9c33913c862fd"></a><!-- doxytag: member="Gio::FileEnumerator::gobj" ref="aa54f2d24a93f78b20fa9c33913c862fd" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GFileEnumerator* Gio::FileEnumerator::gobj </td> <td>(</td> <td class="paramname"> )</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#a778a94181132976bbfb0519793f3b32e">Glib::ObjectBase</a>.</p> </div> </div> <a class="anchor" id="a7c4e1d7258796a85d5b473e08168bd8c"></a><!-- doxytag: member="Gio::FileEnumerator::gobj" ref="a7c4e1d7258796a85d5b473e08168bd8c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GFileEnumerator* Gio::FileEnumerator::gobj </td> <td>(</td> <td class="paramname"> )</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#a4c6efc18be8cb9c56e58fc0bd20fafbe">Glib::ObjectBase</a>.</p> </div> </div> <a class="anchor" id="ac744c1c54800fb3764ea6ce5546f7937"></a><!-- doxytag: member="Gio::FileEnumerator::gobj_copy" ref="ac744c1c54800fb3764ea6ce5546f7937" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GFileEnumerator* Gio::FileEnumerator::gobj_copy </td> <td>(</td> <td class="paramname"> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p> </div> </div> <a class="anchor" id="a3e1fb2fb2a8f8916929506828ded33b8"></a><!-- doxytag: member="Gio::FileEnumerator::has_pending" ref="a3e1fb2fb2a8f8916929506828ded33b8" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileEnumerator::has_pending </td> <td>(</td> <td class="paramname"> )</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Checks if the file enumerator has pending operations. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the <em>enumerator</em> has pending operations. </dd></dl> </div> </div> <a class="anchor" id="a3908b180f25ff93b1cb6cb86945981a1"></a><!-- doxytag: member="Gio::FileEnumerator::is_closed" ref="a3908b180f25ff93b1cb6cb86945981a1" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileEnumerator::is_closed </td> <td>(</td> <td class="paramname"> )</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Checks if the file enumerator has been closed. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the <em>enumerator</em> is closed. </dd></dl> </div> </div> <a class="anchor" id="a73b5814cb108be591316cedabe362800"></a><!-- doxytag: member="Gio::FileEnumerator::next_file" ref="a73b5814cb108be591316cedabe362800" args="(const Glib::RefPtr< Cancellable > &cancellable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1FileInfo.html">FileInfo</a>> Gio::FileEnumerator::next_file </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& </td> <td class="paramname"> <em>cancellable</em> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns information for the next file in the enumerated object. </p> <p>Will block until the information is available. The <a class="el" href="classGio_1_1FileInfo.html" title="FileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.">FileInfo</a> returned from this function will contain attributes that match the attribute string that was passed when the <a class="el" href="classGio_1_1FileEnumerator.html" title="Enumerated Files Routines.">FileEnumerator</a> was created.</p> <p>On error, returns <code>0</code> and sets <em>error</em> to the error. If the enumerator is at the end, <code>0</code> will be returned and <em>error</em> will be unset. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cancellable</td><td>Optional <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object, <code>0</code> to ignore. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classGio_1_1FileInfo.html" title="FileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.">FileInfo</a> or <code>0</code> on error or end of enumerator. Free the returned object with Glib::object_unref() when no longer needed. </dd></dl> </div> </div> <a class="anchor" id="a881873317d4a608d06405b3da3940e5a"></a><!-- doxytag: member="Gio::FileEnumerator::next_file" ref="a881873317d4a608d06405b3da3940e5a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1FileInfo.html">FileInfo</a>> Gio::FileEnumerator::next_file </td> <td>(</td> <td class="paramname"> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classGio_1_1FileInfo.html" title="FileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.">FileInfo</a> or an empty RefPtr on error or end of enumerator. </dd></dl> </div> </div> <a class="anchor" id="ad51d86fbf6ebef0aed7f4321e1df6e79"></a><!-- doxytag: member="Gio::FileEnumerator::next_files_async" ref="ad51d86fbf6ebef0aed7f4321e1df6e79" args="(const SlotAsyncReady &slot, int num_files=1, int io_priority=Glib::PRIORITY_DEFAULT)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileEnumerator::next_files_async </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a> & </td> <td class="paramname"> <em>slot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>num_files</em> = <code>1</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Request information for a number of files from the enumerator asynchronously. </p> <p>When all I/O for the operation is finished the callback slot will be called with the requested information.</p> <p>The callback could be called with less than num_files files in case of error or at the end of the enumerator. In case of a partial error the callback will be called with any succeeding items and no error, and on the next request the error will be reported. If a request is cancelled the callback will be called with ERROR_CANCELLED.</p> <p>During an async request no other sync and async calls are allowed, and will result in ERROR_PENDING errors.</p> <p>Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. The default priority is PRIORITY_DEFAULT. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A callback to call when the request is satisfied. </td></tr> <tr><td class="paramname">num_files</td><td>The number of file info objects to request. </td></tr> <tr><td class="paramname">io_priority</td><td>The I/O priority of the request. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a78de4d8a6a97cc68fc236a69a730f033"></a><!-- doxytag: member="Gio::FileEnumerator::next_files_async" ref="a78de4d8a6a97cc68fc236a69a730f033" args="(const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, int num_files=1, int io_priority=Glib::PRIORITY_DEFAULT)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileEnumerator::next_files_async </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">SlotAsyncReady</a> & </td> <td class="paramname"> <em>slot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> >& </td> <td class="paramname"> <em>cancellable</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>num_files</em> = <code>1</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Request information for a number of files from the enumerator asynchronously. </p> <p>When all I/O for the operation is finished the callback slot will be called with the requested information.</p> <p>The callback could be called with less than num_files files in case of error or at the end of the enumerator. In case of a partial error the callback will be called with any succeeding items and no error, and on the next request the error will be reported. If a request is cancelled the callback will be called with ERROR_CANCELLED.</p> <p>During an async request no other sync and async calls are allowed, and will result in ERROR_PENDING errors.</p> <p>Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. The default priority is PRIORITY_DEFAULT. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A callback to call when the request is satisfied. </td></tr> <tr><td class="paramname">cancellable</td><td>An cancellable object which can be used to cancel the request. </td></tr> <tr><td class="paramname">num_files</td><td>The number of file info objects to request. </td></tr> <tr><td class="paramname">io_priority</td><td>The I/O priority of the request. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ab012d7f4428713efadbd10571f314973"></a><!-- doxytag: member="Gio::FileEnumerator::next_files_finish" ref="ab012d7f4428713efadbd10571f314973" args="(const Glib::RefPtr< AsyncResult > &result)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1ListHandle.html">Glib::ListHandle</a>< <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1FileInfo.html">FileInfo</a>> > Gio::FileEnumerator::next_files_finish </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AsyncResult.html">AsyncResult</a> >& </td> <td class="paramname"> <em>result</em> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">result</td><td>A <a class="el" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results.">AsyncResult</a>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A List of FileInfos. You must free the list with Glib::list_free() and unref the infos with Glib::object_unref() when you're done with them. </dd></dl> </div> </div> <a class="anchor" id="a666470d02974350df0ed75f94321eaae"></a><!-- doxytag: member="Gio::FileEnumerator::set_pending" ref="a666470d02974350df0ed75f94321eaae" args="(bool pending=true)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileEnumerator::set_pending </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"> <em>pending</em> = <code>true</code> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the file enumerator as having pending operations. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">pending</td><td>A boolean value. </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="aba2d802d7865e00771c69e44da54318a"></a><!-- doxytag: member="Gio::FileEnumerator::wrap" ref="aba2d802d7865e00771c69e44da54318a" args="(GFileEnumerator *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1FileEnumerator.html">Gio::FileEnumerator</a> > wrap </td> <td>(</td> <td class="paramtype">GFileEnumerator * </td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>take_copy</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">object</td><td>The C instance. </td></tr> <tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Apr 5 2011 16:07:13 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address> </body> </html>