This file is indexed.

/usr/include/giomm-2.4/giomm/fileenumerator.h is in libglibmm-2.4-dev 2.46.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
// -*- c++ -*-
// Generated by gmmproc 2.46.3 -- DO NOT MODIFY!
#ifndef _GIOMM_FILEENUMERATOR_H
#define _GIOMM_FILEENUMERATOR_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-

/* Copyright (C) 2007 The glibmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/object.h>
#include <glibmm/arrayhandle.h>
#include <glibmm/listhandle.h>
#include <glibmm/priorities.h>
#include <giomm/asyncresult.h>
#include <giomm/cancellable.h>
#include <giomm/fileinfo.h>
//#include <giomm/file.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GFileEnumerator GFileEnumerator;
typedef struct _GFileEnumeratorClass GFileEnumeratorClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gio
{ class FileEnumerator_Class; } // namespace Gio
#endif //DOXYGEN_SHOULD_SKIP_THIS

namespace Gio
{

class File;

//TODO: Consider wrapping this like a std::iterator (or at least renaming it), though the asyncness probably makes that unsuitable.

/** Enumerated Files Routines.
 * FileEnumerator allows you to operate on a set of Gio::Files, returning a Gio::FileInfo instance for each file enumerated
 * (e.g. Gio::File::enumerate_children() will return a FileEnumerator for each of the children within a directory).
 *
 * To get the next file's information from a Gio::FileEnumerator, use next_file() 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.
 *
 * To close a Gio::FileEnumerator, use FileEnumerator::close(), or its asynchronous version, close_async(). Once a FileEnumerator is closed,
 * no further actions may be performed on it.
 *
 * @newin{2,16}
 */

class FileEnumerator : public Glib::Object
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef FileEnumerator CppObjectType;
  typedef FileEnumerator_Class CppClassType;
  typedef GFileEnumerator BaseObjectType;
  typedef GFileEnumeratorClass BaseClassType;

  // noncopyable
  FileEnumerator(const FileEnumerator&) = delete;
  FileEnumerator& operator=(const FileEnumerator&) = delete;

private:  friend class FileEnumerator_Class;
  static CppClassType fileenumerator_class_;

protected:
  explicit FileEnumerator(const Glib::ConstructParams& construct_params);
  explicit FileEnumerator(GFileEnumerator* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:

  FileEnumerator(FileEnumerator&& src) noexcept;
  FileEnumerator& operator=(FileEnumerator&& src) noexcept;

  virtual ~FileEnumerator() noexcept;

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type()      G_GNUC_CONST;

#ifndef DOXYGEN_SHOULD_SKIP_THIS


  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GFileEnumerator*       gobj()       { return reinterpret_cast<GFileEnumerator*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GFileEnumerator* gobj() const { return reinterpret_cast<GFileEnumerator*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GFileEnumerator* gobj_copy();

private:


public:
  
  /** Returns information for the next file in the enumerated object.
   * Will block until the information is available. The FileInfo 
   * returned from this function will contain attributes that match the 
   * attribute string that was passed when the FileEnumerator was created.
   * 
   * See the documentation of FileEnumerator for information about the
   * order of returned files.
   * 
   * On error, returns <tt>0</tt> and sets @a error to the error. If the
   * enumerator is at the end, <tt>0</tt> will be returned and @a error will
   * be unset.
   * 
   * @param cancellable Optional Cancellable object, <tt>0</tt> to ignore.
   * @return A FileInfo or <tt>0</tt> on error
   * or end of enumerator.  Free the returned object with
   * Glib::object_unref() when no longer needed.
   */
  Glib::RefPtr<FileInfo> next_file(const Glib::RefPtr<Cancellable>& cancellable);

  /// A next_file() convenience overload.
  Glib::RefPtr<FileInfo> next_file();

  
  /** Releases all resources used by this enumerator, making the
   * enumerator return IO_ERROR_CLOSED on all calls.
   * 
   * 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.
   * 
   * @param cancellable Optional Cancellable object, <tt>0</tt> to ignore.
   * @return #<tt>true</tt> on success or #<tt>false</tt> on error.
   */
  bool close(const Glib::RefPtr<Cancellable>& cancellable);

  /// A close() convenience overload.
  bool close();


  /** Request information for a number of files from the enumerator asynchronously.
   * When all I/O for the operation is finished the callback slot will be called with the requested information.
   *
   * 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.
   *
   * During an async request no other sync and async calls are allowed, and will result in ERROR_PENDING errors.
   *
   * 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.
   * @param slot A callback to call when the request is satisfied.
   * @param cancellable An cancellable object which can be used to cancel the request.
   * @param num_files The number of file info objects to request.
   * @param io_priority The I/O priority of the request.
   */
  void next_files_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int num_files = 1, int io_priority = Glib::PRIORITY_DEFAULT);

  /** Request information for a number of files from the enumerator asynchronously.
   * When all I/O for the operation is finished the callback slot will be called with the requested information.
   *
   * 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.
   *
   * During an async request no other sync and async calls are allowed, and will result in ERROR_PENDING errors.
   *
   * 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.
   * @param slot A callback to call when the request is satisfied.
   * @param num_files The number of file info objects to request.
   * @param io_priority The I/O priority of the request.
   */
  void next_files_async(const SlotAsyncReady& slot, int num_files = 1, int io_priority = Glib::PRIORITY_DEFAULT);
  

  /** Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
   * 
   * @param result A AsyncResult.
   * @return 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.
   */
  Glib::ListHandle< Glib::RefPtr<FileInfo> > next_files_finish(const Glib::RefPtr<AsyncResult>& result);


  /** Asynchronously closes the file enumerator.
   *
   * See close(), which is the synchronous version of this function.
   *
   * The operation can be cancelled by triggering the cancellable object from another thread.
   * If the operation was cancelled, a Gio::Error with CANCELLED will be thrown by close_finish().
   *
   * @param io_priority The I/O priority of the request.
   * @param cancellable A Cancellable object which can be used to cancel the operation.
   * @param slot A callback to call when the request is satisfied.
   */
  void close_async(int io_priority, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);

  /** Asynchronously closes the file enumerator.
   *
   * See close(), which is the synchronous version of this function.
   *
   * @param io_priority The I/O priority of the request.
   * @param slot  A callback to call when the request is satisfied.
   */
  void close_async(int io_priority, const SlotAsyncReady& slot);
  

  /** Finishes closing a file enumerator, started from g_file_enumerator_close_async().
   * 
   * If the file enumerator was already closed when g_file_enumerator_close_async() 
   * was called, then this function will throw a Gio::Error with CLOSED, and 
   * return <tt>false</tt>. If the file enumerator had pending operation when the close 
   * operation was started, then this function will throw a Gio::Error with PENDING, and
   * return <tt>false</tt>.  The operation may have been 
   * cancelled by triggering the cancellable object from another thread. If the operation
   * was cancelled, a Gio::Error with CANCELLED will be thrown, and <tt>false</tt> will be 
   * returned.
   * 
   * @param result A AsyncResult.
   * @return <tt>true</tt> if the close operation has finished successfully.
   */
  bool close_finish(const Glib::RefPtr<AsyncResult>& result);

  
  /** Checks if the file enumerator has been closed.
   * 
   * @return <tt>true</tt> if the @a enumerator is closed.
   */
  bool is_closed() const;
  
  /** Checks if the file enumerator has pending operations.
   * 
   * @return <tt>true</tt> if the @a enumerator has pending operations.
   */
  bool has_pending() const;
  
  /** Sets the file enumerator as having pending operations.
   * 
   * @param pending A boolean value.
   */
  void set_pending(bool pending =  true);

  
  /** Get the File container which is being enumerated.
   * 
   * @newin{2,18}
   * 
   * @return The File which is being enumerated.
   */
  Glib::RefPtr<File> get_container();
  
  /** Get the File container which is being enumerated.
   * 
   * @newin{2,18}
   * 
   * @return The File which is being enumerated.
   */
  Glib::RefPtr<const File> get_container() const;

  
  /** Return a new File which refers to the file named by @a info in the source
   * directory of @a enumerator.  This function is primarily intended to be used
   * inside loops with g_file_enumerator_next_file().
   * 
   * This is a convenience method that's equivalent to:
   * 
   * [C example ellipted]
   * 
   * @newin{2,36}
   * 
   * @param info A FileInfo gotten from g_file_enumerator_next_file()
   * or the async equivalents.
   * @return A File for the FileInfo passed it.
   */
  Glib::RefPtr<File> get_child(const Glib::RefPtr<FileInfo>& info);
  
  /** Return a new File which refers to the file named by @a info in the source
   * directory of @a enumerator.  This function is primarily intended to be used
   * inside loops with g_file_enumerator_next_file().
   * 
   * This is a convenience method that's equivalent to:
   * 
   * [C example ellipted]
   * 
   * @newin{2,36}
   * 
   * @param info A FileInfo gotten from g_file_enumerator_next_file()
   * or the async equivalents.
   * @return A File for the FileInfo passed it.
   */
  Glib::RefPtr<const File> get_child(const Glib::RefPtr<FileInfo>& info) const;


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};

} // namespace Gio


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Gio::FileEnumerator
   */
  Glib::RefPtr<Gio::FileEnumerator> wrap(GFileEnumerator* object, bool take_copy = false);
}


#endif /* _GIOMM_FILEENUMERATOR_H */