gfileinfo.h 42.6 KB
Newer Older
1
/* GIO - GLib Input, Output and Streaming Library
2
 *
3 4 5 6 7
 * 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
8
 * version 2.1 of the License, or (at your option) any later version.
9 10 11 12 13 14 15
 *
 * 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
16
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 18 19 20
 *
 * Author: Alexander Larsson <alexl@redhat.com>
 */

21 22 23
#ifndef __G_FILE_INFO_H__
#define __G_FILE_INFO_H__

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

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

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))

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

46

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

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

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

/**
74
 * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
75
 *
76
 * A key in the "standard" namespace for checking if the file is a symlink.
77 78
 * Typically the actual type is something else, if we followed the symlink
 * to get the type.
79
 * On Windows NTFS mountpoints are considered to be symlinks as well.
80 81
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
82
#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink"         /* boolean */
83 84

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

92 93 94 95 96 97 98 99 100 101 102 103 104 105
/**
 * G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE:
 *
 * A key in the "standard" namespace for checking if a file is
 * volatile. This is meant for opaque, non-POSIX-like backends to
 * indicate that the URI is not persistent. Applications should look
 * at #G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.
 *
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.46
 **/
#define G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE "standard::is-volatile"      /* boolean */

106
/**
107
 * G_FILE_ATTRIBUTE_STANDARD_NAME:
108
 *
109
 * A key in the "standard" namespace for getting the name of the file.
110 111
 * The name is the on-disk filename which may not be in any known encoding,
 * and can thus not be generally displayed as is.
112
 * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
113
 * name in a user interface.
114 115
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
 **/
116
#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name"                     /* byte string */
117 118

/**
119
 * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
120
 *
121
 * A key in the "standard" namespace for getting the display name of the file.
122 123
 * A display name is guaranteed to be in UTF8 and can thus be displayed in
 * the UI.
124 125
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
126
#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name"     /* string */
127 128

/**
129
 * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
130
 *
131
 * A key in the "standard" namespace for edit name of the file.
132 133 134 135
 * 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).
136
 *
137 138
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
139
#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name"           /* string */
140 141

/**
142
 * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
143
 *
144
 * A key in the "standard" namespace for getting the copy name of the file.
145
 * The copy name is an optional version of the name. If available it's always
146 147 148 149
 * 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.
150
 *
151 152
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
153
#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name"           /* string */
154

155 156
/**
 * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
157
 *
158 159 160 161 162 163
 * 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.
164
 *
165 166 167 168
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description"        /* string */

169
/**
170
 * G_FILE_ATTRIBUTE_STANDARD_ICON:
171
 *
172
 * A key in the "standard" namespace for getting the icon for the file.
173 174 175
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
 * The value for this key should contain a #GIcon.
 **/
176
#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon"                     /* object (GIcon) */
177

178 179 180 181 182 183 184 185 186 187 188
/**
 * G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON:
 *
 * A key in the "standard" namespace for getting the symbolic icon for the file.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
 * The value for this key should contain a #GIcon.
 *
 * Since: 2.34
 **/
#define G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON "standard::symbolic-icon"   /* object (GIcon) */

189
/**
190
 * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
191
 *
192
 * A key in the "standard" namespace for getting the content type of the file.
193 194 195
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 * The value for this key should contain a valid content type.
 **/
196
#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"     /* string */
197 198

/**
199
 * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
200
 *
201
 * A key in the "standard" namespace for getting the fast content type.
202 203 204
 * 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.
205
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
206
 *
207
 **/
208
#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */
209 210

/**
211
 * G_FILE_ATTRIBUTE_STANDARD_SIZE:
212
 *
213
 * A key in the "standard" namespace for getting the file's size (in bytes).
214 215
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
 **/
216
#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size"                     /* uint64 */
217

218
/**
Tomáš Bžatek's avatar
Tomáš Bžatek committed
219
 * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
220 221 222 223 224 225
 *
 * 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
226
 *
227
 * Since: 2.20
228 229 230
 **/
#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */

231
/**
232
 * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
233
 *
234
 * A key in the "standard" namespace for getting the symlink target, if the file
235
 * is a symlink. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
236
 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
237
 **/
238
#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */
239 240

/**
241
 * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
242
 *
243
 * A key in the "standard" namespace for getting the target URI for the file, in
244
 * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
245 246
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
247
#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri"         /* string */
248 249

/**
250
 * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
251 252
 *
 * A key in the "standard" namespace for setting the sort order of a file.
253
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
254
 * An example use would be in file managers, which would use this key
255 256 257
 * 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.
258
 **/
259
#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order"         /* int32  */
260 261

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

263 264
/**
 * G_FILE_ATTRIBUTE_ETAG_VALUE:
265
 *
266
 * A key in the "etag" namespace for getting the value of the file's
267
 * entity tag. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
268
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
269
 **/
270
#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value"                 /* string */
271

272 273
/* File identifier, for e.g. avoiding loops when doing recursive
 * directory scanning
Matthias Clasen's avatar
Matthias Clasen committed
274 275
 */

276 277
/**
 * G_FILE_ATTRIBUTE_ID_FILE:
278
 *
279 280 281 282 283
 * 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.
 **/
284
#define G_FILE_ATTRIBUTE_ID_FILE "id::file"                     /* string */
285 286

/**
287
 * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
288
 *
289 290
 * A key in the "id" namespace for getting the file system identifier.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
291 292 293
 * 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).
294
 **/
295
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem"         /* string */
296 297 298

/* Calculated Access Rights for current user */

299 300
/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
301 302
 *
 * A key in the "access" namespace for getting read privileges.
303
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
304
 * This attribute will be %TRUE if the user is able to read the file.
305
 **/
306
#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read"       /* boolean */
307 308 309

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
310
 *
Matthias Clasen's avatar
Matthias Clasen committed
311
 * A key in the "access" namespace for getting write privileges.
312
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
313
 * This attribute will be %TRUE if the user is able to write to the file.
314
 **/
315
#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write"     /* boolean */
316 317 318

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
319
 *
Matthias Clasen's avatar
Matthias Clasen committed
320
 * A key in the "access" namespace for getting execution privileges.
321
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
322
 * This attribute will be %TRUE if the user is able to execute the file.
323
 **/
324
#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */
325 326 327

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
328
 *
Matthias Clasen's avatar
Matthias Clasen committed
329
 * A key in the "access" namespace for checking deletion privileges.
330
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
331
 * This attribute will be %TRUE if the user is able to delete the file.
332
 **/
333
#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete"   /* boolean */
334 335 336

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
337
 *
Matthias Clasen's avatar
Matthias Clasen committed
338
 * A key in the "access" namespace for checking trashing privileges.
339
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
340
 * This attribute will be %TRUE if the user is able to move the file to
341
 * the trash.
342
 **/
343
#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash"     /* boolean */
344 345 346

/**
 * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
347
 *
Matthias Clasen's avatar
Matthias Clasen committed
348
 * A key in the "access" namespace for checking renaming privileges.
349
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
Matthias Clasen's avatar
Matthias Clasen committed
350
 * This attribute will be %TRUE if the user is able to rename the file.
351
 **/
352
#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename"   /* boolean */
Matthias Clasen's avatar
Matthias Clasen committed
353

354 355 356
/* TODO: Should we have special version for directories? can_enumerate, etc */

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

358 359
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
360
 *
361
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
362 363
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
364
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount"     /* boolean */
365 366 367

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
368
 *
369
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
370 371
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
372
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */
373 374 375

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
376
 *
377
 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
378 379
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
380
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject"     /* boolean */
381 382 383

/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
384
 *
385 386 387
 * A key in the "mountable" namespace for getting the unix device.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
388
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */
389

390 391 392 393 394 395
/**
 * 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.
 *
396
 * Since: 2.22
397 398 399
 **/
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */

400 401
/**
 * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
402
 *
403
 * A key in the "mountable" namespace for getting the HAL UDI for the mountable
404 405
 * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
406
#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi"         /* string */
407

408 409 410 411
/**
 * 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.
412
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
413 414 415 416 417
 *
 * Since: 2.22
 */
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start"     /* boolean */

418 419 420 421 422 423 424 425 426 427 428
/**
 * 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 */

429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
/**
 * 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) */

449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
/**
 * 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 */
469

470 471
/* Time attributes */

472 473
/**
 * G_FILE_ATTRIBUTE_TIME_MODIFIED:
474
 *
475
 * A key in the "time" namespace for getting the time the file was last
476
 * modified. Corresponding #GFileAttributeType is
477 478
 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the
 * file was modified, in seconds since the UNIX epoch.
479
 **/
480
#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified"           /* uint64 */
481 482 483

/**
 * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
484
 *
485
 * A key in the "time" namespace for getting the microseconds of the time
486 487
 * the file was last modified. This should be used in conjunction with
 * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
488 489
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
490
#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
491

492 493
/**
 * G_FILE_ATTRIBUTE_TIME_ACCESS:
494
 *
495
 * A key in the "time" namespace for getting the time the file was last
496
 * accessed. Corresponding #GFileAttributeType is
497 498
 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the
 * file was last accessed, in seconds since the UNIX epoch.
499
 **/
500
#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access"               /* uint64 */
Matthias Clasen's avatar
Matthias Clasen committed
501

502 503
/**
 * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
504
 *
505
 * A key in the "time" namespace for getting the microseconds of the time
506
 * the file was last accessed. This should be used in conjunction with
507
 * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
508 509
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
510
#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec"     /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
511

512 513
/**
 * G_FILE_ATTRIBUTE_TIME_CHANGED:
514
 *
515
 * A key in the "time" namespace for getting the time the file was last
516
 * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
517 518
 * and contains the time since the file was last changed, in seconds since the
 * UNIX epoch.
Matthias Clasen's avatar
Matthias Clasen committed
519 520
 *
 * This corresponds to the traditional UNIX ctime.
521
 **/
522
#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed"             /* uint64 */
Matthias Clasen's avatar
Matthias Clasen committed
523

524 525
/**
 * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
526
 *
527
 * A key in the "time" namespace for getting the microseconds of the time
528
 * the file was last changed. This should be used in conjunction with
529 530
 * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
531
 **/
532
#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec"   /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
533

534 535
/**
 * G_FILE_ATTRIBUTE_TIME_CREATED:
536
 *
537
 * A key in the "time" namespace for getting the time the file was created.
538
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
539 540
 * and contains the time since the file was created, in seconds since the UNIX
 * epoch.
Matthias Clasen's avatar
Matthias Clasen committed
541 542
 *
 * This corresponds to the NTFS ctime.
543
 **/
544
#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created"             /* uint64 */
545 546 547

/**
 * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
548
 *
549
 * A key in the "time" namespace for getting the microseconds of the time
550
 * the file was created. This should be used in conjunction with
551 552
 * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
553
 **/
554
#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec"   /* uint32 */
555 556

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

558 559
/**
 * G_FILE_ATTRIBUTE_UNIX_DEVICE:
560 561 562 563 564
 *
 * 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.
565
 **/
566
#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device"               /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
567

568 569
/**
 * G_FILE_ATTRIBUTE_UNIX_INODE:
570
 *
571
 * A key in the "unix" namespace for getting the inode of the file.
572
 * This attribute is only available for UNIX file systems. Corresponding
573 574
 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
 **/
575
#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode"                 /* uint64 */
Matthias Clasen's avatar
Matthias Clasen committed
576

577 578
/**
 * G_FILE_ATTRIBUTE_UNIX_MODE:
579
 *
Matthias Clasen's avatar
Matthias Clasen committed
580
 * A key in the "unix" namespace for getting the mode of the file
581 582
 * (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
583
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
584
 **/
585
#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode"                   /* uint32 */
586 587 588

/**
 * G_FILE_ATTRIBUTE_UNIX_NLINK:
589 590 591 592
 *
 * 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
593
 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
594
 **/
595
#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink"                 /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
596

597 598
/**
 * G_FILE_ATTRIBUTE_UNIX_UID:
599 600 601
 *
 * A key in the "unix" namespace for getting the user ID for the file.
 * This attribute is only available for UNIX file systems.
602 603
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
604
#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid"                     /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
605

606 607
/**
 * G_FILE_ATTRIBUTE_UNIX_GID:
608
 *
609
 * A key in the "unix" namespace for getting the group ID for the file.
610
 * This attribute is only available for UNIX file systems.
611 612
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
613
#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid"                     /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
614

615 616
/**
 * G_FILE_ATTRIBUTE_UNIX_RDEV:
617 618 619 620
 *
 * 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
621
 * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
622
 **/
623
#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev"                   /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
624

625 626
/**
 * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
627 628 629
 *
 * A key in the "unix" namespace for getting the block size for the file
 * system. This attribute is only available for UNIX file systems.
630 631
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
632
#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size"       /* uint32 */
Matthias Clasen's avatar
Matthias Clasen committed
633

634 635
/**
 * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
636 637 638
 *
 * 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.
639 640
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
 **/
641
#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks"               /* uint64 */
642 643 644

/**
 * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
645 646 647
 *
 * 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
648 649
 * point. Since 2.58, `/` is considered to be a mount point.
 * This attribute is only available for UNIX file systems.
Matthias Clasen's avatar
Matthias Clasen committed
650
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
651
 **/
652
#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */
653 654

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

656 657
/**
 * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
658 659 660 661
 *
 * 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
662
 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
663
 **/
664
#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive"         /* boolean */
665 666 667

/**
 * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
668 669 670 671
 *
 * 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
672
 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
673
 **/
674
#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system"           /* boolean */
675

LRN's avatar
LRN committed
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702
/**
 * G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT:
 *
 * A key in the "dos" namespace for checking if the file is a NTFS mount point
 * (a volume mount or a junction point).
 * This attribute is %TRUE if file is a reparse point of type
 * [IO_REPARSE_TAG_MOUNT_POINT](https://msdn.microsoft.com/en-us/library/dd541667.aspx).
 * This attribute is only available for DOS file systems.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.60
 **/
#define G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT "dos::is-mountpoint"   /* boolean */

/**
 * G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG:
 *
 * A key in the "dos" namespace for getting the file NTFS reparse tag.
 * This value is 0 for files that are not reparse points.
 * See the [Reparse Tags](https://msdn.microsoft.com/en-us/library/dd541667.aspx)
 * page for possible reparse tag values. Corresponding #GFileAttributeType
 * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 *
 * Since: 2.60
 **/
#define G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG "dos::reparse-point-tag"   /* uint32 */

703
/* Owner attributes */
Matthias Clasen's avatar
Matthias Clasen committed
704

705 706
/**
 * G_FILE_ATTRIBUTE_OWNER_USER:
707 708 709
 *
 * 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
710
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
711
 **/
712
#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user"                 /* string */
713 714 715

/**
 * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
716 717 718
 *
 * 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
719
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
720
 **/
721
#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real"       /* string */
722 723 724

/**
 * G_FILE_ATTRIBUTE_OWNER_GROUP:
725
 *
726 727 728
 * A key in the "owner" namespace for getting the file owner's group.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
729
#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group"               /* string */
730 731 732

/* Thumbnails */

733 734
/**
 * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
735 736 737
 *
 * A key in the "thumbnail" namespace for getting the path to the thumbnail
 * image. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
738
 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
739
 **/
740
#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path"         /* bytestring */
741
/**
Matthias Clasen's avatar
Matthias Clasen committed
742
 * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
743 744 745 746
 *
 * 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.
747
 **/
748
#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed"         /* boolean */
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763
/**
 * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID:
 *
 * A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.
 * This attribute is %TRUE if the thumbnail is up-to-date with the file it represents,
 * and %FALSE if the file has been modified since the thumbnail was generated.
 *
 * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE,
 * it indicates that thumbnailing may be attempted again and may succeed.
 *
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 *
 * Since: 2.40
 */
#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID "thumbnail::is-valid"        /* boolean */
764

765 766 767 768 769 770 771 772 773 774 775 776 777 778 779
/* 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) */

780 781
/* File system info (for g_file_get_filesystem_info) */

782
/**
783
 * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
784 785 786
 *
 * 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
787
 * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
788
 **/
789
#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size"                       /* uint64 */
790 791

/**
792
 * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
793 794 795
 *
 * 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
796
 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
797
 **/
798
#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free"                       /* uint64 */
799

800 801 802 803 804 805 806 807 808 809 810
/**
 * G_FILE_ATTRIBUTE_FILESYSTEM_USED:
 *
 * A key in the "filesystem" namespace for getting the number of bytes of used on the
 * file system. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
 *
 * Since: 2.32
 */
#define G_FILE_ATTRIBUTE_FILESYSTEM_USED "filesystem::used"                       /* uint64 */

811
/**
812
 * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
813
 *
814
 * A key in the "filesystem" namespace for getting the file system's type.
815 816
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
 **/
817
#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type"                       /* string */
818 819

/**
820
 * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
821
 *
822 823
 * 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.
824
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
825
 **/
826
#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly"               /* boolean */
827

828 829 830 831 832 833 834 835 836 837
/**
 * 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) */

838 839 840 841 842 843 844 845 846
/**
 * G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE:
 *
 * A key in the "filesystem" namespace for checking if the file system
 * is remote. Is set to %TRUE if the file system is remote.
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
 **/
#define G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE "filesystem::remote"                   /* boolean */

847 848
/**
 * G_FILE_ATTRIBUTE_GVFS_BACKEND:
849
 *
850
 * A key in the "gvfs" namespace that gets the name of the current
851
 * GVFS backend in use. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
852
 * %G_FILE_ATTRIBUTE_TYPE_STRING.
853
 **/
854
#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend"             /* string */
855 856 857

/**
 * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
858
 *
859
 * A key in the "selinux" namespace for getting the file's SELinux
860
 * context. Corresponding #GFileAttributeType is
Matthias Clasen's avatar
Matthias Clasen committed
861 862
 * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
 * available if GLib has been built with SELinux support.
863 864
 **/
#define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context"       /* string */
865

866 867 868
/**
 * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
 *
869
 * A key in the "trash" namespace.  When requested against
870
 * `trash:///` returns the number of (toplevel) items in the trash folder.
871 872 873 874
 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
 **/
#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count"     /* uint32 */

875 876 877 878
/**
 * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
 *
 * A key in the "trash" namespace.  When requested against
879
 * items in `trash:///`, will return the original path to the file before it
880
 * was trashed. Corresponding #GFileAttributeType is
881
 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
882
 *
883
 * Since: 2.24
884
 **/
885
#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path"     /* byte string */
886 887 888 889 890

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

899 900 901 902 903 904 905 906 907 908 909
/**
 * G_FILE_ATTRIBUTE_RECENT_MODIFIED:
 *
 * A key in the "recent" namespace for getting time, when the metadata for the
 * file in `recent:///` was last changed. Corresponding #GFileAttributeType is
 * %G_FILE_ATTRIBUTE_TYPE_INT64.
 *
 * Since: 2.52
 **/
#define G_FILE_ATTRIBUTE_RECENT_MODIFIED "recent::modified"          /* int64 (time_t) */

910
GLIB_AVAILABLE_IN_ALL
911
GType              g_file_info_get_type                  (void) G_GNUC_CONST;
912

913
GLIB_AVAILABLE_IN_ALL
914
GFileInfo *        g_file_info_new                       (void);
915
GLIB_AVAILABLE_IN_ALL
916
GFileInfo *        g_file_info_dup                       (GFileInfo  *other);
917
GLIB_AVAILABLE_IN_ALL
918 919
void               g_file_info_copy_into                 (GFileInfo  *src_info,
							  GFileInfo  *dest_info);
920
GLIB_AVAILABLE_IN_ALL
921 922
gboolean           g_file_info_has_attribute             (GFileInfo  *info,
							  const char *attribute);
923
GLIB_AVAILABLE_IN_ALL
924 925
gboolean           g_file_info_has_namespace             (GFileInfo  *info,
							  const char *name_space);
926
GLIB_AVAILABLE_IN_ALL
927 928
char **            g_file_info_list_attributes           (GFileInfo  *info,
							  const char *name_space);
929
GLIB_AVAILABLE_IN_ALL
930 931 932 933 934
gboolean           g_file_info_get_attribute_data        (GFileInfo  *info,
							  const char *attribute,
							  GFileAttributeType *type,
							  gpointer   *value_pp,
							  GFileAttributeStatus *status);
935
GLIB_AVAILABLE_IN_ALL
936 937
GFileAttributeType g_file_info_get_attribute_type        (GFileInfo  *info,
							  const char *attribute);
938
GLIB_AVAILABLE_IN_ALL
939 940
void               g_file_info_remove_attribute          (GFileInfo  *info,
							  const char *attribute);
941
GLIB_AVAILABLE_IN_ALL
942 943
GFileAttributeStatus g_file_info_get_attribute_status    (GFileInfo  *info,
							  const char *attribute);
944
GLIB_AVAILABLE_IN_ALL
945 946 947
gboolean           g_file_info_set_attribute_status      (GFileInfo  *info,
							  const char *attribute,
							  GFileAttributeStatus status);
948
GLIB_AVAILABLE_IN_ALL
949
char *             g_file_info_get_attribute_as_string   (GFileInfo  *info,
950
							  const char *attribute);
951
GLIB_AVAILABLE_IN_ALL
952 953
const char *       g_file_info_get_attribute_string      (GFileInfo  *info,
							  const char *attribute);
954
GLIB_AVAILABLE_IN_ALL
955 956
const char *       g_file_info_get_attribute_byte_string (GFileInfo  *info,
							  const char *attribute);
957
GLIB_AVAILABLE_IN_ALL
958 959
gboolean           g_file_info_get_attribute_boolean     (GFileInfo  *info,
							  const char *attribute);
960
GLIB_AVAILABLE_IN_ALL
961 962
guint32            g_file_info_get_attribute_uint32      (GFileInfo  *info,
							  const char *attribute);
963
GLIB_AVAILABLE_IN_ALL
964 965
gint32             g_file_info_get_attribute_int32       (GFileInfo  *info,
							  const char *attribute);
966
GLIB_AVAILABLE_IN_ALL
967 968
guint64            g_file_info_get_attribute_uint64      (GFileInfo  *info,
							  const char *attribute);
969
GLIB_AVAILABLE_IN_ALL
970 971
gint64             g_file_info_get_attribute_int64       (GFileInfo  *info,
							  const char *attribute);
972
GLIB_AVAILABLE_IN_ALL
973 974
GObject *          g_file_info_get_attribute_object      (GFileInfo  *info,
							  const char *attribute);
975
GLIB_AVAILABLE_IN_ALL
976 977
char **            g_file_info_get_attribute_stringv     (GFileInfo  *info,
							  const char *attribute);
978

979
GLIB_AVAILABLE_IN_ALL
980 981
void               g_file_info_set_attribute             (GFileInfo  *info,
							  const char *attribute,
982 983
							  GFileAttributeType type,
							  gpointer    value_p);
984
GLIB_AVAILABLE_IN_ALL
985 986 987
void               g_file_info_set_attribute_string      (GFileInfo  *info,
							  const char *attribute,
							  const char *attr_value);
988
GLIB_AVAILABLE_IN_ALL
989 990 991
void               g_file_info_set_attribute_byte_string (GFileInfo  *info,
							  const char *attribute,
							  const char *attr_value);
992
GLIB_AVAILABLE_IN_ALL
993 994 995
void               g_file_info_set_attribute_boolean     (GFileInfo  *info,
							  const char *attribute,
							  gboolean    attr_value);
996
GLIB_AVAILABLE_IN_ALL
997 998 999
void               g_file_info_set_attribute_uint32      (GFileInfo  *info,
							  const char *attribute,
							  guint32     attr_value);
1000
GLIB_AVAILABLE_IN_ALL
1001 1002 1003
void               g_file_info_set_attribute_int32       (GFileInfo  *info,
							  const char *attribute,
							  gint32      attr_value);
1004
GLIB_AVAILABLE_IN_ALL
1005 1006 1007
void               g_file_info_set_attribute_uint64      (GFileInfo  *info,
							  const char *attribute,
							  guint64     attr_value);
1008
GLIB_AVAILABLE_IN_ALL
1009 1010 1011
void               g_file_info_set_attribute_int64       (GFileInfo  *info,
							  const char *attribute,
							  gint64      attr_value);
1012
GLIB_AVAILABLE_IN_ALL
1013 1014 1015
void               g_file_info_set_attribute_object      (GFileInfo  *info,
							  const char *attribute,
							  GObject    *attr_value);
1016
GLIB_AVAILABLE_IN_ALL
1017 1018 1019
void               g_file_info_set_attribute_stringv     (GFileInfo  *info,
							  const char *attribute,
							  char      **attr_value);
1020

1021
GLIB_AVAILABLE_IN_ALL
1022 1023 1024
void               g_file_info_clear_status              (GFileInfo  *info);

/* Helper getters: */
1025
GLIB_AVAILABLE_IN_2_36
1026
GDateTime *       g_file_info_get_deletion_date      (GFileInfo         *info);
1027
GLIB_AVAILABLE_IN_ALL
1028
GFileType         g_file_info_get_file_type          (GFileInfo         *info);
1029
GLIB_AVAILABLE_IN_ALL
1030
gboolean          g_file_info_get_is_hidden          (GFileInfo         *info);
1031
GLIB_AVAILABLE_IN_ALL
1032
gboolean          g_file_info_get_is_backup          (GFileInfo         *info);
1033
GLIB_AVAILABLE_IN_ALL
1034
gboolean          g_file_info_get_is_symlink         (GFileInfo         *info);
1035
GLIB_AVAILABLE_IN_ALL
1036
const char *      g_file_info_get_name               (GFileInfo         *info);
1037
GLIB_AVAILABLE_IN_ALL
1038
const char *      g_file_info_get_display_name       (GFileInfo         *info);
1039
GLIB_AVAILABLE_IN_ALL
1040
const char *      g_file_info_get_edit_name          (GFileInfo         *info);
1041
GLIB_AVAILABLE_IN_ALL
1042
GIcon *           g_file_info_get_icon               (GFileInfo         *info);
1043
GLIB_AVAILABLE_IN_ALL
1044
GIcon *           g_file_info_get_symbolic_icon      (GFileInfo         *info);
1045
GLIB_AVAILABLE_IN_ALL
1046
const char *      g_file_info_get_content_type       (GFileInfo         *info);
1047
GLIB_AVAILABLE_IN_ALL
1048
goffset           g_file_info_get_size               (GFileInfo         *info);
1049
GLIB_AVAILABLE_IN_ALL
1050 1051
void              g_file_info_get_modification_time  (GFileInfo         *info,
						      GTimeVal          *result);
1052
GLIB_AVAILABLE_IN_ALL
1053
const char *      g_file_info_get_symlink_target     (GFileInfo         *info);
1054
GLIB_AVAILABLE_IN_ALL
1055
const char *      g_file_info_get_etag               (GFileInfo         *info);
1056
GLIB_AVAILABLE_IN_ALL
1057 1058
gint32            g_file_info_get_sort_order         (GFileInfo         *info);

1059
GLIB_AVAILABLE_IN_ALL
1060 1061
void              g_file_info_set_attribute_mask     (GFileInfo         *info,
						      GFileAttributeMatcher *mask);
1062
GLIB_AVAILABLE_IN_ALL
1063 1064 1065
void              g_file_info_unset_attribute_mask   (GFileInfo         *info);

/* Helper setters: */
1066
GLIB_AVAILABLE_IN_ALL
1067 1068
void              g_file_info_set_file_type          (GFileInfo         *info,
						      GFileType          type);
1069
GLIB_AVAILABLE_IN_ALL
1070 1071
void              g_file_info_set_is_hidden          (GFileInfo         *info,
						      gboolean           is_hidden);
1072
GLIB_AVAILABLE_IN_ALL
1073 1074
void              g_file_info_set_is_symlink         (GFileInfo         *info,
						      gboolean           is_symlink);
1075
GLIB_AVAILABLE_IN_ALL
1076 1077
void              g_file_info_set_name               (GFileInfo         *info,
						      const char        *name);
1078
GLIB_AVAILABLE_IN_ALL
1079 1080
void              g_file_info_set_display_name       (GFileInfo         *info,
						      const char        *display_name);
1081
GLIB_AVAILABLE_IN_ALL
1082 1083
void              g_file_info_set_edit_name          (GFileInfo         *info,
						      const char        *edit_name);
1084
GLIB_AVAILABLE_IN_ALL
1085 1086
void              g_file_info_set_icon               (GFileInfo         *info,
						      GIcon             *icon);
1087
GLIB_AVAILABLE_IN_ALL
1088 1089
void              g_file_info_set_symbolic_icon      (GFileInfo         *info,
						      GIcon             *icon);
1090
GLIB_AVAILABLE_IN_ALL
1091 1092
void              g_file_info_set_content_type       (GFileInfo         *info,
						      const char        *content_type);
1093
GLIB_AVAILABLE_IN_ALL
1094 1095
void              g_file_info_set_size               (GFileInfo         *info,
						      goffset            size);
1096
GLIB_AVAILABLE_IN_ALL
1097 1098
void              g_file_info_set_modification_time  (GFileInfo         *info,
						      GTimeVal          *mtime);
1099
GLIB_AVAILABLE_IN_ALL
1100 1101
void              g_file_info_set_symlink_target     (GFileInfo         *info,
						      const char        *symlink_target);
1102
GLIB_AVAILABLE_IN_ALL
1103 1104 1105
void              g_file_info_set_sort_order         (GFileInfo         *info,
						      gint32             sort_order);

1106
#define G_TYPE_FILE_ATTRIBUTE_MATCHER (g_file_attribute_matcher_get_type ())
1107
GLIB_AVAILABLE_IN_ALL
1108 1109
GType g_file_attribute_matcher_get_type (void) G_GNUC_CONST;

1110
GLIB_AVAILABLE_IN_ALL
1111
GFileAttributeMatcher *g_file_attribute_matcher_new            (const char            *attributes);
1112
GLIB_AVAILABLE_IN_ALL
1113
GFileAttributeMatcher *g_file_attribute_matcher_ref            (GFileAttributeMatcher *matcher);