gfileinfo.h 36.7 KB
Newer Older
1
/* GIO - GLib Input, Output and Streaming Library
2
 *
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 * Copyright (C) 2006-2007 Red Hat, Inc.
 *
 * 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 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., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Alexander Larsson <alexl@redhat.com>
 */

23 24 25 26
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif

27 28 29
#ifndef __G_FILE_INFO_H__
#define __G_FILE_INFO_H__

30
#include <gio/giotypes.h>
31 32 33 34 35 36 37 38 39 40

G_BEGIN_DECLS

#define G_TYPE_FILE_INFO         (g_file_info_get_type ())
#define G_FILE_INFO(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INFO, GFileInfo))
#define G_FILE_INFO_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INFO, GFileInfoClass))
#define G_IS_FILE_INFO(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INFO))
#define G_IS_FILE_INFO_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INFO))
#define G_FILE_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INFO, GFileInfoClass))

41 42
/**
 * GFileInfo:
43
 *
44 45
 * Stores information about a file system object referenced by a #GFile.
 **/
46
typedef struct _GFileInfoClass   GFileInfoClass;
47

48

49
/* Common Attributes:  */
50
/**
51
 * G_FILE_ATTRIBUTE_STANDARD_TYPE:
52 53
 *
 * A key in the "standard" namespace for storing file types.
54 55 56
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 * The value for this key should contain a #GFileType.
 **/
57
#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type"                     /* uint32 (GFileType) */
58 59

/**
60
 * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
61 62
 *
 * A key in the "standard" namespace for checking if a file is hidden.
63 64
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
65
#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden"           /* boolean */
66 67

/**
68
 * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
69
 *
70
 * A key in the "standard" namespace for checking if a file is a backup file.
71 72
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
73
#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup"           /* boolean */
74 75

/**
76
 * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
77
 *
78
 * A key in the "standard" namespace for checking if the file is a symlink.
79 80
 * Typically the actual type is something else, if we followed the symlink
 * to get the type.
81 82
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
83
#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink"         /* boolean */
84 85

/**
86
 * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
87
 *
88
 * A key in the "standard" namespace for checking if a file is virtual.
89 90
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
91
#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual"         /* boolean */
92 93

/**
94
 * G_FILE_ATTRIBUTE_STANDARD_NAME:
95
 *
96
 * A key in the "standard" namespace for getting the name of the file.
97 98
 * The name is the on-disk filename which may not be in any known encoding,
 * and can thus not be generally displayed as is.
99
 * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
100
 * name in a user interface.
101 102
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
 **/
103
#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name"                     /* byte string */
104 105

/**
106
 * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
107
 *
108
 * A key in the "standard" namespace for getting the display name of the file.
109 110
 * A display name is guaranteed to be in UTF8 and can thus be displayed in
 * the UI.
111 112
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
113
#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name"     /* string */
114 115

/**
116
 * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
117
 *
118
 * A key in the "standard" namespace for edit name of the file.
119 120 121 122
 * An edit name is similar to the display name, but it is meant to be
 * used when you want to rename the file in the UI. The display name
 * might contain information you don't want in the new filename (such as
 * "(invalid unicode)" if the filename was in an invalid encoding).
123
 *
124 125
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
126
#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name"           /* string */
127 128

/**
129
 * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
130
 *
131
 * A key in the "standard" namespace for getting the copy name of the file.
132
 * The copy name is an optional version of the name. If available it's always
133 134 135 136
 * in UTF8, and corresponds directly to the original filename (only transcoded to
 * UTF8). This is useful if you want to copy the file to another filesystem that
 * might have a different encoding. If the filename is not a valid string in the
 * encoding selected for the filesystem it is in then the copy name will not be set.
137
 *
138 139
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
140
#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name"           /* string */
141

142 143
/**
 * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
144
 *
145 146 147 148 149 150
 * A key in the "standard" namespace for getting the description of the file.
 * The description is a utf8 string that describes the file, generally containing
 * the filename, but can also contain furter information. Example descriptions
 * could be "filename (on hostname)" for a remote file or "filename (in trash)"
 * for a file in the trash. This is useful for instance as the window title
 * when displaying a directory or for a bookmarks menu.
151
 *
152 153 154 155
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description"        /* string */

156
/**
157
 * G_FILE_ATTRIBUTE_STANDARD_ICON:
158
 *
159
 * A key in the "standard" namespace for getting the icon for the file.
160 161 162
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
 * The value for this key should contain a #GIcon.
 **/
163
#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon"                     /* object (GIcon) */
164 165

/**
166
 * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
167
 *
168
 * A key in the "standard" namespace for getting the content type of the file.
169 170 171
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 * The value for this key should contain a valid content type.
 **/
172
#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"     /* string */
173 174

/**
175
 * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
176
 *
177
 * A key in the "standard" namespace for getting the fast content type.
178 179 180
 * The fast content type isn't as reliable as the regular one, as it
 * only uses the filename to guess it, but it is faster to calculate than the
 * regular content type.
181
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
182
 *
183
 **/
184
#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */
185 186

/**
187
 * G_FILE_ATTRIBUTE_STANDARD_SIZE:
188
 *
189
 * A key in the "standard" namespace for getting the file's size (in bytes).
190 191
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
 **/
192
#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size"                     /* uint64 */
193

194
/**
Tomáš Bžatek's avatar
Tomáš Bžatek committed
195
 * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
196 197 198 199 200 201
 *
 * A key in the "standard" namespace for getting the amount of disk space
 * that is consumed by the file (in bytes).  This will generally be larger
 * than the file size (due to block size overhead) but can occasionally be
 * smaller (for example, for sparse files).
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
Tomáš Bžatek's avatar
Tomáš Bžatek committed
202
 *
203
 * Since: 2.20
204 205 206
 **/
#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */

207
/**
208
 * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
209
 *
210
 * A key in the "standard" namespace for getting the symlink target, if the file
211
 * is a symlink. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
212
 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
213
 **/
214
#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */
215 216

/**
217
 * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
218
 *
219
 * A key in the "standard" namespace for getting the target URI for the file, in
220
 * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
221 222
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
223
#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri"         /* string */
224 225

/**
226
 * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
227 228
 *
 * A key in the "standard" namespace for setting the sort order of a file.
229
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
230
 * An example use would be in file managers, which would use this key
231 232 233
 * to set the order files are displayed. Files with smaller sort order
 * should be sorted first, and files without sort order as if sort order
 * was zero.
234
 **/
235
#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order"         /* int32  */
236 237

/* Entity tags, used to avoid missing updates on save */
Matthias Clasen's avatar
Matthias Clasen committed
238

239 240
/**
 * G_FILE_ATTRIBUTE_ETAG_VALUE:
241
 *
242
 * A key in the "etag" namespace for getting the value of the file's
243
 * entity tag. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
244
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
245
 **/
246
#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value"                 /* string */
247

248 249
/* File identifier, for e.g. avoiding loops when doing recursive
 * directory scanning
Matthias Clasen's avatar
Matthias Clasen committed
250 251
 */

252 253
/**
 * G_FILE_ATTRIBUTE_ID_FILE:
254
 *
255 256 257 258 259
 * A key in the "id" namespace for getting a file identifier.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 * An example use would be during listing files, to avoid recursive
 * directory scanning.
 **/
260
#define G_FILE_ATTRIBUTE_ID_FILE "id::file"                     /* string */
261 262

/**
263
 * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
264
 *
265 266
 * A key in the "id" namespace for getting the file system identifier.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
267 268 269
 * An example use would be during drag and drop to see if the source
 * and target are on the same filesystem (default to move) or not (default
 * to copy).
270
 **/
271
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem"         /* string */
272 273 274

/* Calculated Access Rights for current user */

275 276
/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
277 278
 *
 * A key in the "access" namespace for getting read privileges.
279
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
280
 * This attribute will be %TRUE if the user is able to read the file.
281
 **/
282
#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read"       /* boolean */
283 284 285

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
286
 *
Matthias Clasen's avatar
Matthias Clasen committed
287
 * A key in the "access" namespace for getting write privileges.
288
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
289
 * This attribute will be %TRUE if the user is able to write to the file.
290
 **/
291
#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write"     /* boolean */
292 293 294

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
295
 *
Matthias Clasen's avatar
Matthias Clasen committed
296
 * A key in the "access" namespace for getting execution privileges.
297
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
298
 * This attribute will be %TRUE if the user is able to execute the file.
299
 **/
300
#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */
301 302 303

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
304
 *
Matthias Clasen's avatar
Matthias Clasen committed
305
 * A key in the "access" namespace for checking deletion privileges.
306
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
307
 * This attribute will be %TRUE if the user is able to delete the file.
308
 **/
309
#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete"   /* boolean */
310 311 312

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
313
 *
Matthias Clasen's avatar
Matthias Clasen committed
314
 * A key in the "access" namespace for checking trashing privileges.
315
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
316
 * This attribute will be %TRUE if the user is able to move the file to
317
 * the trash.
318
 **/
319
#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash"     /* boolean */
320 321 322

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
323
 *
Matthias Clasen's avatar
Matthias Clasen committed
324
 * A key in the "access" namespace for checking renaming privileges.
325
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
326
 * This attribute will be %TRUE if the user is able to rename the file.
327
 **/
328
#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename"   /* boolean */
Matthias Clasen's avatar
Matthias Clasen committed
329

330 331 332
/* TODO: Should we have special version for directories? can_enumerate, etc */

/* Mountable attributes */
Matthias Clasen's avatar
Matthias Clasen committed
333

334 335
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
336
 *
337
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
338 339
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
340
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount"     /* boolean */
341 342 343

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
344
 *
345
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
346 347
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
348
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */
349 350 351

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
352
 *
353
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
354 355
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
356
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject"     /* boolean */
357 358 359

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
360
 *
361 362 363
 * A key in the "mountable" namespace for getting the unix device.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
364
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */
365

366 367 368 369 370 371
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
 *
 * A key in the "mountable" namespace for getting the unix device file.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 *
372
 * Since: 2.22
373 374 375
 **/
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */

376 377
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
378
 *
379
 * A key in the "mountable" namespace for getting the HAL UDI for the mountable
380 381
 * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
382
#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi"         /* string */
383

384 385 386 387
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
 *
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
388
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
389 390 391 392 393
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start"     /* boolean */

394 395 396 397 398 399 400 401 402 403 404
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
 *
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
 * degraded.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED "mountable::can-start-degraded"     /* boolean */

405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
 *
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP "mountable::can-stop"      /* boolean */

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
 *
 * A key in the "mountable" namespace for getting the #GDriveStartStopType.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE "mountable::start-stop-type" /* uint32 (GDriveStartStopType) */

425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
 *
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL "mountable::can-poll"      /* boolean */

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
 *
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
 * is automatically polled for media.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC "mountable::is-media-check-automatic"      /* boolean */
445

446 447
/* Time attributes */

448 449
/**
 * G_FILE_ATTRIBUTE_TIME_MODIFIED:
450
 *
451
 * A key in the "time" namespace for getting the time the file was last
452 453
 * modified. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
Matthias Clasen's avatar
Matthias Clasen committed
454
 * file was modified.
455
 **/
456
#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified"           /* uint64 */
457 458 459

/**
 * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
460
 *
461
 * A key in the "time" namespace for getting the miliseconds of the time
462 463
 * the file was last modified. This should be used in conjunction with
 * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
464 465
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
466
#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
467

468 469
/**
 * G_FILE_ATTRIBUTE_TIME_ACCESS:
470
 *
471
 * A key in the "time" namespace for getting the time the file was last
472 473
 * accessed. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
Matthias Clasen's avatar
Matthias Clasen committed
474
 * file was last accessed.
475
 **/
476
#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access"               /* uint64 */
Matthias Clasen's avatar
Matthias Clasen committed
477

478 479
/**
 * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
480
 *
481
 * A key in the "time" namespace for getting the microseconds of the time
482
 * the file was last accessed. This should be used in conjunction with
483
 * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
484 485
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
486
#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec"     /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
487

488 489
/**
 * G_FILE_ATTRIBUTE_TIME_CHANGED:
490
 *
491
 * A key in the "time" namespace for getting the time the file was last
492
 * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
493
 * and contains the UNIX time since the file was last changed.
Matthias Clasen's avatar
Matthias Clasen committed
494 495
 *
 * This corresponds to the traditional UNIX ctime.
496
 **/
497
#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed"             /* uint64 */
Matthias Clasen's avatar
Matthias Clasen committed
498

499 500
/**
 * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
501
 *
502
 * A key in the "time" namespace for getting the microseconds of the time
503
 * the file was last changed. This should be used in conjunction with
504 505
 * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
506
 **/
507
#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec"   /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
508

509 510
/**
 * G_FILE_ATTRIBUTE_TIME_CREATED:
511
 *
512
 * A key in the "time" namespace for getting the time the file was created.
513
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
514
 * and contains the UNIX time since the file was created.
Matthias Clasen's avatar
Matthias Clasen committed
515 516
 *
 * This corresponds to the NTFS ctime.
517
 **/
518
#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created"             /* uint64 */
519 520 521

/**
 * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
522
 *
523
 * A key in the "time" namespace for getting the microseconds of the time
524
 * the file was created. This should be used in conjunction with
525 526
 * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
527
 **/
528
#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec"   /* uint32 */
529 530

/* Unix specific attributes */
Matthias Clasen's avatar
Matthias Clasen committed
531

532 533
/**
 * G_FILE_ATTRIBUTE_UNIX_DEVICE:
534 535 536 537 538
 *
 * A key in the "unix" namespace for getting the device id of the device the
 * file is located on (see stat() documentation). This attribute is only
 * available for UNIX file systems. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
539
 **/
540
#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device"               /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
541

542 543
/**
 * G_FILE_ATTRIBUTE_UNIX_INODE:
544
 *
545
 * A key in the "unix" namespace for getting the inode of the file.
546
 * This attribute is only available for UNIX file systems. Corresponding
547 548
 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
 **/
549
#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode"                 /* uint64 */
Matthias Clasen's avatar
Matthias Clasen committed
550

551 552
/**
 * G_FILE_ATTRIBUTE_UNIX_MODE:
553
 *
Matthias Clasen's avatar
Matthias Clasen committed
554
 * A key in the "unix" namespace for getting the mode of the file
555 556
 * (e.g. whether the file is a regular file, symlink, etc). See lstat()
 * documentation. This attribute is only available for UNIX file systems.
Matthias Clasen's avatar
Matthias Clasen committed
557
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
558
 **/
559
#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode"                   /* uint32 */
560 561 562

/**
 * G_FILE_ATTRIBUTE_UNIX_NLINK:
563 564 565 566
 *
 * A key in the "unix" namespace for getting the number of hard links
 * for a file. See lstat() documentation. This attribute is only available
 * for UNIX file systems. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
567
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
568
 **/
569
#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink"                 /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
570

571 572
/**
 * G_FILE_ATTRIBUTE_UNIX_UID:
573 574 575
 *
 * A key in the "unix" namespace for getting the user ID for the file.
 * This attribute is only available for UNIX file systems.
576 577
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
578
#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid"                     /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
579

580 581
/**
 * G_FILE_ATTRIBUTE_UNIX_GID:
582
 *
583
 * A key in the "unix" namespace for getting the group ID for the file.
584
 * This attribute is only available for UNIX file systems.
585 586
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
587
#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid"                     /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
588

589 590
/**
 * G_FILE_ATTRIBUTE_UNIX_RDEV:
591 592 593 594
 *
 * A key in the "unix" namespace for getting the device ID for the file
 * (if it is a special file). See lstat() documentation. This attribute
 * is only available for UNIX file systems. Corresponding #GFileAttributeType
Matthias Clasen's avatar
Matthias Clasen committed
595
 * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
596
 **/
597
#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev"                   /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
598

599 600
/**
 * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
601 602 603
 *
 * A key in the "unix" namespace for getting the block size for the file
 * system. This attribute is only available for UNIX file systems.
604 605
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
606
#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size"       /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
607

608 609
/**
 * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
610 611 612
 *
 * A key in the "unix" namespace for getting the number of blocks allocated
 * for the file. This attribute is only available for UNIX file systems.
613 614
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
 **/
615
#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks"               /* uint64 */
616 617 618

/**
 * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
619 620 621 622
 *
 * A key in the "unix" namespace for checking if the file represents a
 * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
 * point. This attribute is only available for UNIX file systems.
Matthias Clasen's avatar
Matthias Clasen committed
623
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
624
 **/
625
#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */
626 627

/* DOS specific attributes */
Matthias Clasen's avatar
Matthias Clasen committed
628

629 630
/**
 * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
631 632 633 634
 *
 * A key in the "dos" namespace for checking if the file's archive flag
 * is set. This attribute is %TRUE if the archive flag is set. This attribute
 * is only available for DOS file systems. Corresponding #GFileAttributeType
Matthias Clasen's avatar
Matthias Clasen committed
635
 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
636
 **/
637
#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive"         /* boolean */
638 639 640

/**
 * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
641 642 643 644
 *
 * A key in the "dos" namespace for checking if the file's backup flag
 * is set. This attribute is %TRUE if the backup flag is set. This attribute
 * is only available for DOS file systems. Corresponding #GFileAttributeType
Matthias Clasen's avatar
Matthias Clasen committed
645
 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
646
 **/
647
#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system"           /* boolean */
648 649

/* Owner attributes */
Matthias Clasen's avatar
Matthias Clasen committed
650

651 652
/**
 * G_FILE_ATTRIBUTE_OWNER_USER:
653 654 655
 *
 * A key in the "owner" namespace for getting the user name of the
 * file's owner. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
656
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
657
 **/
658
#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user"                 /* string */
659 660 661

/**
 * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
662 663 664
 *
 * A key in the "owner" namespace for getting the real name of the
 * user that owns the file. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
665
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
666
 **/
667
#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real"       /* string */
668 669 670

/**
 * G_FILE_ATTRIBUTE_OWNER_GROUP:
671
 *
672 673 674
 * A key in the "owner" namespace for getting the file owner's group.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
675
#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group"               /* string */
676 677 678

/* Thumbnails */

679 680
/**
 * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
681 682 683
 *
 * A key in the "thumbnail" namespace for getting the path to the thumbnail
 * image. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
684
 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
685
 **/
686
#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path"         /* bytestring */
687
/**
Matthias Clasen's avatar
Matthias Clasen committed
688
 * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
689 690 691 692
 *
 * A key in the "thumbnail" namespace for checking if thumbnailing failed.
 * This attribute is %TRUE if thumbnailing failed. Corresponding
 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
693
 **/
694
#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed"         /* boolean */
695

696 697 698 699 700 701 702 703 704 705 706 707 708 709 710
/* Preview */

/**
 * G_FILE_ATTRIBUTE_PREVIEW_ICON:
 *
 * A key in the "preview" namespace for getting a #GIcon that can be
 * used to get preview of the file. For example, it may be a low
 * resolution thumbnail without metadata. Corresponding
 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
 * for this key should contain a #GIcon.
 *
 * Since: 2.20
 **/
#define G_FILE_ATTRIBUTE_PREVIEW_ICON "preview::icon"         /* object (GIcon) */

711 712
/* File system info (for g_file_get_filesystem_info) */

713
/**
714
 * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
715 716 717
 *
 * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
 * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
Matthias Clasen's avatar
Matthias Clasen committed
718
 * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
719
 **/
720
#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size"                       /* uint64 */
721 722

/**
723
 * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
724 725 726
 *
 * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
 * file system. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
727
 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
728
 **/
729
#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free"                       /* uint64 */
730 731

/**
732
 * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
733
 *
734
 * A key in the "filesystem" namespace for getting the file system's type.
735 736
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
737
#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type"                       /* string */
738 739

/**
740
 * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
Matthias Clasen's avatar
Matthias Clasen committed
741
 *
742 743
 * A key in the "filesystem" namespace for checking if the file system
 * is read only. Is set to %TRUE if the file system is read only.
744
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
745
 **/
746
#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly"               /* boolean */
747

748 749 750 751 752 753 754 755 756 757
/**
 * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
 *
 * A key in the "filesystem" namespace for hinting a file manager
 * application whether it should preview (e.g. thumbnail) files on the
 * file system. The value for this key contain a
 * #GFilesystemPreviewType.
 **/
#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview"        /* uint32 (GFilesystemPreviewType) */

758 759
/**
 * G_FILE_ATTRIBUTE_GVFS_BACKEND:
760
 *
761
 * A key in the "gvfs" namespace that gets the name of the current
762
 * GVFS backend in use. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
763
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
764
 **/
765
#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend"             /* string */
766 767 768

/**
 * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
769
 *
770
 * A key in the "selinux" namespace for getting the file's SELinux
771
 * context. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
772 773
 * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
 * available if GLib has been built with SELinux support.
774 775
 **/
#define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context"       /* string */
776

777 778 779
/**
 * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
 *
780
 * A key in the "trash" namespace.  When requested against
Matthias Clasen's avatar
Matthias Clasen committed
781
 * "trash:///" returns the number of (toplevel) items in the trash folder.
782 783 784 785
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count"     /* uint32 */

786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809
/**
 * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
 *
 * A key in the "trash" namespace.  When requested against
 * items in "trash:///", will return the original path to the file before it
 * was trashed. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
 *
 * Since: 2.24.
 **/
#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path"     /* string */

/**
 * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
 *
 * A key in the "trash" namespace.  When requested against
 * items in "trash:///", will return the date and time when the file
 * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 *
 * Since: 2.24.
 **/
#define G_FILE_ATTRIBUTE_TRASH_DELETION_DATE "trash::deletion-date"  /* string */

810
GType              g_file_info_get_type                  (void) G_GNUC_CONST;
811 812 813 814 815 816 817

GFileInfo *        g_file_info_new                       (void);
GFileInfo *        g_file_info_dup                       (GFileInfo  *other);
void               g_file_info_copy_into                 (GFileInfo  *src_info,
							  GFileInfo  *dest_info);
gboolean           g_file_info_has_attribute             (GFileInfo  *info,
							  const char *attribute);
818 819
gboolean           g_file_info_has_namespace             (GFileInfo  *info,
							  const char *name_space);
820 821
char **            g_file_info_list_attributes           (GFileInfo  *info,
							  const char *name_space);
822 823 824 825 826
gboolean           g_file_info_get_attribute_data        (GFileInfo  *info,
							  const char *attribute,
							  GFileAttributeType *type,
							  gpointer   *value_pp,
							  GFileAttributeStatus *status);
827 828 829 830
GFileAttributeType g_file_info_get_attribute_type        (GFileInfo  *info,
							  const char *attribute);
void               g_file_info_remove_attribute          (GFileInfo  *info,
							  const char *attribute);
831 832
GFileAttributeStatus g_file_info_get_attribute_status    (GFileInfo  *info,
							  const char *attribute);
833 834 835
gboolean           g_file_info_set_attribute_status      (GFileInfo  *info,
							  const char *attribute,
							  GFileAttributeStatus status);
836
char *             g_file_info_get_attribute_as_string   (GFileInfo  *info,
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853
							  const char *attribute);
const char *       g_file_info_get_attribute_string      (GFileInfo  *info,
							  const char *attribute);
const char *       g_file_info_get_attribute_byte_string (GFileInfo  *info,
							  const char *attribute);
gboolean           g_file_info_get_attribute_boolean     (GFileInfo  *info,
							  const char *attribute);
guint32            g_file_info_get_attribute_uint32      (GFileInfo  *info,
							  const char *attribute);
gint32             g_file_info_get_attribute_int32       (GFileInfo  *info,
							  const char *attribute);
guint64            g_file_info_get_attribute_uint64      (GFileInfo  *info,
							  const char *attribute);
gint64             g_file_info_get_attribute_int64       (GFileInfo  *info,
							  const char *attribute);
GObject *          g_file_info_get_attribute_object      (GFileInfo  *info,
							  const char *attribute);
854 855
char **            g_file_info_get_attribute_stringv     (GFileInfo  *info,
							  const char *attribute);
856 857 858

void               g_file_info_set_attribute             (GFileInfo  *info,
							  const char *attribute,
859 860
							  GFileAttributeType type,
							  gpointer    value_p);
861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884
void               g_file_info_set_attribute_string      (GFileInfo  *info,
							  const char *attribute,
							  const char *attr_value);
void               g_file_info_set_attribute_byte_string (GFileInfo  *info,
							  const char *attribute,
							  const char *attr_value);
void               g_file_info_set_attribute_boolean     (GFileInfo  *info,
							  const char *attribute,
							  gboolean    attr_value);
void               g_file_info_set_attribute_uint32      (GFileInfo  *info,
							  const char *attribute,
							  guint32     attr_value);
void               g_file_info_set_attribute_int32       (GFileInfo  *info,
							  const char *attribute,
							  gint32      attr_value);
void               g_file_info_set_attribute_uint64      (GFileInfo  *info,
							  const char *attribute,
							  guint64     attr_value);
void               g_file_info_set_attribute_int64       (GFileInfo  *info,
							  const char *attribute,
							  gint64      attr_value);
void               g_file_info_set_attribute_object      (GFileInfo  *info,
							  const char *attribute,
							  GObject    *attr_value);
885 886 887
void               g_file_info_set_attribute_stringv     (GFileInfo  *info,
							  const char *attribute,
							  char      **attr_value);
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937

void               g_file_info_clear_status              (GFileInfo  *info);

/* Helper getters: */
GFileType         g_file_info_get_file_type          (GFileInfo         *info);
gboolean          g_file_info_get_is_hidden          (GFileInfo         *info);
gboolean          g_file_info_get_is_backup          (GFileInfo         *info);
gboolean          g_file_info_get_is_symlink         (GFileInfo         *info);
const char *      g_file_info_get_name               (GFileInfo         *info);
const char *      g_file_info_get_display_name       (GFileInfo         *info);
const char *      g_file_info_get_edit_name          (GFileInfo         *info);
GIcon *           g_file_info_get_icon               (GFileInfo         *info);
const char *      g_file_info_get_content_type       (GFileInfo         *info);
goffset           g_file_info_get_size               (GFileInfo         *info);
void              g_file_info_get_modification_time  (GFileInfo         *info,
						      GTimeVal          *result);
const char *      g_file_info_get_symlink_target     (GFileInfo         *info);
const char *      g_file_info_get_etag               (GFileInfo         *info);
gint32            g_file_info_get_sort_order         (GFileInfo         *info);

void              g_file_info_set_attribute_mask     (GFileInfo         *info,
						      GFileAttributeMatcher *mask);
void              g_file_info_unset_attribute_mask   (GFileInfo         *info);

/* Helper setters: */
void              g_file_info_set_file_type          (GFileInfo         *info,
						      GFileType          type);
void              g_file_info_set_is_hidden          (GFileInfo         *info,
						      gboolean           is_hidden);
void              g_file_info_set_is_symlink         (GFileInfo         *info,
						      gboolean           is_symlink);
void              g_file_info_set_name               (GFileInfo         *info,
						      const char        *name);
void              g_file_info_set_display_name       (GFileInfo         *info,
						      const char        *display_name);
void              g_file_info_set_edit_name          (GFileInfo         *info,
						      const char        *edit_name);
void              g_file_info_set_icon               (GFileInfo         *info,
						      GIcon             *icon);
void              g_file_info_set_content_type       (GFileInfo         *info,
						      const char        *content_type);
void              g_file_info_set_size               (GFileInfo         *info,
						      goffset            size);
void              g_file_info_set_modification_time  (GFileInfo         *info,
						      GTimeVal          *mtime);
void              g_file_info_set_symlink_target     (GFileInfo         *info,
						      const char        *symlink_target);
void              g_file_info_set_sort_order         (GFileInfo         *info,
						      gint32             sort_order);

938
GType                  g_file_attribute_matcher_get_type       (void) G_GNUC_CONST;
939 940 941 942 943 944 945 946 947 948 949 950 951 952
GFileAttributeMatcher *g_file_attribute_matcher_new            (const char            *attributes);
GFileAttributeMatcher *g_file_attribute_matcher_ref            (GFileAttributeMatcher *matcher);
void                   g_file_attribute_matcher_unref          (GFileAttributeMatcher *matcher);
gboolean               g_file_attribute_matcher_matches        (GFileAttributeMatcher *matcher,
								const char            *attribute);
gboolean               g_file_attribute_matcher_matches_only   (GFileAttributeMatcher *matcher,
								const char            *attribute);
gboolean               g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher,
								     const char            *ns);
const char *           g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher);

G_END_DECLS

#endif /* __G_FILE_INFO_H__ */