| 1 |
/* |
|---|
| 2 |
* This file is part of gtkD. |
|---|
| 3 |
* |
|---|
| 4 |
* gtkD is free software; you can redistribute it and/or modify |
|---|
| 5 |
* it under the terms of the GNU Lesser General Public License |
|---|
| 6 |
* as published by the Free Software Foundation; either version 3 |
|---|
| 7 |
* of the License, or (at your option) any later version, with |
|---|
| 8 |
* some exceptions, please read the COPYING file. |
|---|
| 9 |
* |
|---|
| 10 |
* gtkD is distributed in the hope that it will be useful, |
|---|
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 |
* GNU Lesser General Public License for more details. |
|---|
| 14 |
* |
|---|
| 15 |
* You should have received a copy of the GNU Lesser General Public License |
|---|
| 16 |
* along with gtkD; if not, write to the Free Software |
|---|
| 17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA |
|---|
| 18 |
*/ |
|---|
| 19 |
|
|---|
| 20 |
// generated automatically - do not change |
|---|
| 21 |
// find conversion definition on APILookup.txt |
|---|
| 22 |
// implement new conversion functionalities on the wrap.utils pakage |
|---|
| 23 |
|
|---|
| 24 |
/* |
|---|
| 25 |
* Conversion parameters: |
|---|
| 26 |
* inFile = gio-GFileAttribute.html |
|---|
| 27 |
* outPack = gio |
|---|
| 28 |
* outFile = FileAttributeInfoList |
|---|
| 29 |
* strct = GFileAttributeInfoList |
|---|
| 30 |
* realStrct= |
|---|
| 31 |
* ctorStrct= |
|---|
| 32 |
* clss = FileAttributeInfoList |
|---|
| 33 |
* interf = |
|---|
| 34 |
* class Code: No |
|---|
| 35 |
* interface Code: No |
|---|
| 36 |
* template for: |
|---|
| 37 |
* extend = |
|---|
| 38 |
* implements: |
|---|
| 39 |
* prefixes: |
|---|
| 40 |
* - g_file_attribute_info_list_ |
|---|
| 41 |
* omit structs: |
|---|
| 42 |
* omit prefixes: |
|---|
| 43 |
* omit code: |
|---|
| 44 |
* omit signals: |
|---|
| 45 |
* imports: |
|---|
| 46 |
* - glib.Str |
|---|
| 47 |
* structWrap: |
|---|
| 48 |
* - GFileAttributeInfoList* -> FileAttributeInfoList |
|---|
| 49 |
* module aliases: |
|---|
| 50 |
* local aliases: |
|---|
| 51 |
* overrides: |
|---|
| 52 |
*/ |
|---|
| 53 |
|
|---|
| 54 |
module gio.FileAttributeInfoList; |
|---|
| 55 |
|
|---|
| 56 |
public import gtkc.giotypes; |
|---|
| 57 |
|
|---|
| 58 |
private import gtkc.gio; |
|---|
| 59 |
private import glib.ConstructionException; |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
private import glib.Str; |
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
/** |
|---|
| 68 |
* Description |
|---|
| 69 |
* File attributes in GIO consist of a list of key-value pairs. |
|---|
| 70 |
* Keys are strings that contain a key namespace and a key name, separated |
|---|
| 71 |
* by a colon, e.g. "namespace:keyname". Namespaces are included to sort |
|---|
| 72 |
* key-value pairs by namespaces for relevance. Keys can be retrived |
|---|
| 73 |
* using wildcards, e.g. "standard::*" will return all of the keys in the |
|---|
| 74 |
* "standard" namespace. |
|---|
| 75 |
* Values are stored within the list in GFileAttributeValue structures. |
|---|
| 76 |
* Values can store different types, listed in the enum GFileAttributeType. |
|---|
| 77 |
* Upon creation of a GFileAttributeValue, the type will be set to |
|---|
| 78 |
* G_FILE_ATTRIBUTE_TYPE_INVALID. |
|---|
| 79 |
* The list of possible attributes for a filesystem (pointed to by a GFile) is |
|---|
| 80 |
* availible as a GFileAttributeInfoList. This list is queryable by key names |
|---|
| 81 |
* as indicated earlier. |
|---|
| 82 |
* Classes that implement GFileIface will create a GFileAttributeInfoList and |
|---|
| 83 |
* install default keys and values for their given file system, architecture, |
|---|
| 84 |
* and other possible implementation details (e.g., on a UNIX system, a file |
|---|
| 85 |
* attribute key will be registered for the user id for a given file). |
|---|
| 86 |
* Table 1. GFileAttributes Default Namespaces |
|---|
| 87 |
* Namspace |
|---|
| 88 |
* Description |
|---|
| 89 |
* "standard" |
|---|
| 90 |
* The "Standard" namespace. General file |
|---|
| 91 |
* information that any application may need should be put in this namespace. |
|---|
| 92 |
* Examples include the file's name, type, and size. |
|---|
| 93 |
* "etag" |
|---|
| 94 |
* The "Entity Tag" |
|---|
| 95 |
* namespace. Currently, the only key in this namespace is "value", which contains |
|---|
| 96 |
* the value of the current entity tag. |
|---|
| 97 |
* "id" |
|---|
| 98 |
* The "Identification" namespace. This |
|---|
| 99 |
* namespace is used by file managers and applications that list directories |
|---|
| 100 |
* to check for loops and to uniquely identify files. |
|---|
| 101 |
* "access" |
|---|
| 102 |
* The "Access" namespace. Used to check |
|---|
| 103 |
* if a user has the proper privilidges to access files and perform |
|---|
| 104 |
* file operations. Keys in this namespace are made to be generic |
|---|
| 105 |
* and easily understood, e.g. the "can_read" key is TRUE if |
|---|
| 106 |
* the current user has permission to read the file. UNIX permissions and |
|---|
| 107 |
* NTFS ACLs in Windows should be mapped to these values. |
|---|
| 108 |
* "mountable" |
|---|
| 109 |
* The "Mountable" namespace. Includes |
|---|
| 110 |
* simple boolean keys for checking if a file or path supports mount operations, e.g. |
|---|
| 111 |
* mount, unmount, eject. These are used for files of type G_FILE_TYPE_MOUNTABLE. |
|---|
| 112 |
* "time" |
|---|
| 113 |
* The "Time" namespace. Includes file |
|---|
| 114 |
* access, changed, created times. |
|---|
| 115 |
* "unix" |
|---|
| 116 |
* The "Unix" namespace. Includes UNIX-specific |
|---|
| 117 |
* information and may not be available for all files. Examples include |
|---|
| 118 |
* the UNIX "UID", "GID", etc. |
|---|
| 119 |
* "dos" |
|---|
| 120 |
* The "DOS" namespace. Includes DOS-specific |
|---|
| 121 |
* information and may not be available for all files. Examples include |
|---|
| 122 |
* "is_system" for checking if a file is marked as a system file, and "is_archive" |
|---|
| 123 |
* for checking if a file is marked as an archive file. |
|---|
| 124 |
* "owner" |
|---|
| 125 |
* The "Owner" namespace. Includes information |
|---|
| 126 |
* about who owns a file. May not be available for all file systems. Examples include |
|---|
| 127 |
* "user" for getting the user name of the file owner. This information is often mapped from |
|---|
| 128 |
* some backend specific data such as a unix UID. |
|---|
| 129 |
* "thumbnail" |
|---|
| 130 |
* The "Thumbnail" namespace. Includes |
|---|
| 131 |
* information about file thumbnails and their location within the file system. Exaples of |
|---|
| 132 |
* keys in this namespace include "path" to get the location of a thumbnail, and "failed" |
|---|
| 133 |
* to check if thumbnailing of the file failed. |
|---|
| 134 |
* "filesystem" |
|---|
| 135 |
* The "Filesystem" namespace. Gets information |
|---|
| 136 |
* about the file system where a file is located, such as its type, how much |
|---|
| 137 |
* space is left available, and the overall size of the file system. |
|---|
| 138 |
* "gvfs" |
|---|
| 139 |
* The "GVFS" namespace. Keys in this namespace |
|---|
| 140 |
* contain information about the current GVFS backend in use. |
|---|
| 141 |
* "xattr" |
|---|
| 142 |
* The "xattr" namespace. Gets information |
|---|
| 143 |
* about extended user attributes. See attr(5). The "user." prefix of the |
|---|
| 144 |
* extended user attribute name is stripped away when constructing keys in |
|---|
| 145 |
* this namespace, e.g. "xattr::mime_type" for the extended attribute with |
|---|
| 146 |
* the name "user.mime_type". Note that this information is only available |
|---|
| 147 |
* if GLib has been built with extended attribute support. |
|---|
| 148 |
* "xattr-sys" |
|---|
| 149 |
* The "xattr-sys" namespace. |
|---|
| 150 |
* Gets information about extended attributes which are not user-specific. |
|---|
| 151 |
* See attr(5). Note that this information is only available if GLib |
|---|
| 152 |
* has been built with extended attribute support. |
|---|
| 153 |
* "selinux" |
|---|
| 154 |
* The "SELinux" namespace. Includes |
|---|
| 155 |
* information about the SELinux context of files. Note that this information |
|---|
| 156 |
* is only available if GLib has been built with SELinux support. |
|---|
| 157 |
* Please note that these are not all of the possible namespaces. |
|---|
| 158 |
* More namespaces can be added from GIO modules or by individual applications. |
|---|
| 159 |
* For more information about writing GIO modules, see GIOModule. |
|---|
| 160 |
* Table 2. GFileAttributes Built-in Keys and Value Types |
|---|
| 161 |
* Enum Value |
|---|
| 162 |
* Namespace:Key |
|---|
| 163 |
* Value Type |
|---|
| 164 |
* G_FILE_ATTRIBUTE_STANDARD_TYPE |
|---|
| 165 |
* standard::type |
|---|
| 166 |
* uint32 (GFileType) |
|---|
| 167 |
* G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN |
|---|
| 168 |
* standard::is-hidden |
|---|
| 169 |
* boolean |
|---|
| 170 |
* G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP |
|---|
| 171 |
* standard::is-backup |
|---|
| 172 |
* boolean |
|---|
| 173 |
* G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK |
|---|
| 174 |
* standard::is-symlink |
|---|
| 175 |
* boolean |
|---|
| 176 |
* G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL |
|---|
| 177 |
* standard::is-virtual |
|---|
| 178 |
* boolean |
|---|
| 179 |
* G_FILE_ATTRIBUTE_STANDARD_NAME |
|---|
| 180 |
* standard::name |
|---|
| 181 |
* byte string |
|---|
| 182 |
* G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME |
|---|
| 183 |
* standard::display-name |
|---|
| 184 |
* string |
|---|
| 185 |
* G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME |
|---|
| 186 |
* standard::edit-name |
|---|
| 187 |
* string |
|---|
| 188 |
* G_FILE_ATTRIBUTE_STANDARD_ICON |
|---|
| 189 |
* standard::icon |
|---|
| 190 |
* object (GIcon) |
|---|
| 191 |
* G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE |
|---|
| 192 |
* standard::content-type |
|---|
| 193 |
* string |
|---|
| 194 |
* G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE |
|---|
| 195 |
* standard::fast-content-type |
|---|
| 196 |
* string |
|---|
| 197 |
* G_FILE_ATTRIBUTE_STANDARD_SIZE |
|---|
| 198 |
* standard::size |
|---|
| 199 |
* uint64 |
|---|
| 200 |
* G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE |
|---|
| 201 |
* standard::allocated-size |
|---|
| 202 |
* uint64 |
|---|
| 203 |
* G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET |
|---|
| 204 |
* standard::symlink-target |
|---|
| 205 |
* byte string |
|---|
| 206 |
* G_FILE_ATTRIBUTE_STANDARD_TARGET_URI |
|---|
| 207 |
* standard::target-uri |
|---|
| 208 |
* string |
|---|
| 209 |
* G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER |
|---|
| 210 |
* standard::sort-order |
|---|
| 211 |
* int32 |
|---|
| 212 |
* G_FILE_ATTRIBUTE_ETAG_VALUE |
|---|
| 213 |
* etag::value |
|---|
| 214 |
* string |
|---|
| 215 |
* G_FILE_ATTRIBUTE_ID_FILE |
|---|
| 216 |
* id::file |
|---|
| 217 |
* string |
|---|
| 218 |
* G_FILE_ATTRIBUTE_ID_FILESYSTEM |
|---|
| 219 |
* id::filesystem |
|---|
| 220 |
* string |
|---|
| 221 |
* G_FILE_ATTRIBUTE_ACCESS_CAN_READ |
|---|
| 222 |
* access::can-read |
|---|
| 223 |
* boolean |
|---|
| 224 |
* G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE |
|---|
| 225 |
* access::can-write |
|---|
| 226 |
* boolean |
|---|
| 227 |
* G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE |
|---|
| 228 |
* access::can-execute |
|---|
| 229 |
* boolean |
|---|
| 230 |
* G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE |
|---|
| 231 |
* access::can-delete |
|---|
| 232 |
* boolean |
|---|
| 233 |
* G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH |
|---|
| 234 |
* access::can-trash |
|---|
| 235 |
* boolean |
|---|
| 236 |
* G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME |
|---|
| 237 |
* access::can-rename |
|---|
| 238 |
* boolean |
|---|
| 239 |
* G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT |
|---|
| 240 |
* mountable::can-mount |
|---|
| 241 |
* boolean |
|---|
| 242 |
* G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT |
|---|
| 243 |
* mountable::can-unmount |
|---|
| 244 |
* boolean |
|---|
| 245 |
* G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT |
|---|
| 246 |
* mountable::can-eject |
|---|
| 247 |
* boolean |
|---|
| 248 |
* G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE |
|---|
| 249 |
* mountable::unix-device |
|---|
| 250 |
* uint32 |
|---|
| 251 |
* G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE |
|---|
| 252 |
* mountable::unix-device-file |
|---|
| 253 |
* string |
|---|
| 254 |
* G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI |
|---|
| 255 |
* mountable::hal-udi |
|---|
| 256 |
* string |
|---|
| 257 |
* G_FILE_ATTRIBUTE_TIME_MODIFIED |
|---|
| 258 |
* time::modified |
|---|
| 259 |
* uint64 |
|---|
| 260 |
* G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC |
|---|
| 261 |
* time::modified-usec |
|---|
| 262 |
* uint32 |
|---|
| 263 |
* G_FILE_ATTRIBUTE_TIME_ACCESS |
|---|
| 264 |
* time::access |
|---|
| 265 |
* uint64 |
|---|
| 266 |
* G_FILE_ATTRIBUTE_TIME_ACCESS_USEC |
|---|
| 267 |
* time::access-usec |
|---|
| 268 |
* uint32 |
|---|
| 269 |
* G_FILE_ATTRIBUTE_TIME_CHANGED |
|---|
| 270 |
* time::changed |
|---|
| 271 |
* uint64 |
|---|
| 272 |
* G_FILE_ATTRIBUTE_TIME_CHANGED_USEC |
|---|
| 273 |
* time::changed-usec |
|---|
| 274 |
* uint32 |
|---|
| 275 |
* G_FILE_ATTRIBUTE_TIME_CREATED |
|---|
| 276 |
* time::created |
|---|
| 277 |
* uint64 |
|---|
| 278 |
* G_FILE_ATTRIBUTE_TIME_CREATED_USEC |
|---|
| 279 |
* time::created-usec |
|---|
| 280 |
* uint32 |
|---|
| 281 |
* G_FILE_ATTRIBUTE_UNIX_DEVICE |
|---|
| 282 |
* unix::device |
|---|
| 283 |
* uint32 |
|---|
| 284 |
* G_FILE_ATTRIBUTE_UNIX_INODE |
|---|
| 285 |
* unix::inode |
|---|
| 286 |
* uint64 |
|---|
| 287 |
* G_FILE_ATTRIBUTE_UNIX_MODE |
|---|
| 288 |
* unix::mode |
|---|
| 289 |
* uint32 |
|---|
| 290 |
* G_FILE_ATTRIBUTE_UNIX_NLINK |
|---|
| 291 |
* unix::nlink |
|---|
| 292 |
* uint32 |
|---|
| 293 |
* G_FILE_ATTRIBUTE_UNIX_UID |
|---|
| 294 |
* unix::uid |
|---|
| 295 |
* uint32 |
|---|
| 296 |
* G_FILE_ATTRIBUTE_UNIX_GID |
|---|
| 297 |
* unix::gid |
|---|
| 298 |
* uint32 |
|---|
| 299 |
* G_FILE_ATTRIBUTE_UNIX_RDEV |
|---|
| 300 |
* unix::rdev |
|---|
| 301 |
* uint32 |
|---|
| 302 |
* G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE |
|---|
| 303 |
* unix::block-size |
|---|
| 304 |
* uint32 |
|---|
| 305 |
* G_FILE_ATTRIBUTE_UNIX_BLOCKS |
|---|
| 306 |
* unix::blocks |
|---|
| 307 |
* uint64 |
|---|
| 308 |
* G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT |
|---|
| 309 |
* unix::is-mountpoint |
|---|
| 310 |
* boolean |
|---|
| 311 |
* G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE |
|---|
| 312 |
* dos::is-archive |
|---|
| 313 |
* boolean |
|---|
| 314 |
* G_FILE_ATTRIBUTE_DOS_IS_SYSTEM |
|---|
| 315 |
* dos::is-system |
|---|
| 316 |
* boolean |
|---|
| 317 |
* G_FILE_ATTRIBUTE_OWNER_USER |
|---|
| 318 |
* owner::user |
|---|
| 319 |
* string |
|---|
| 320 |
* G_FILE_ATTRIBUTE_OWNER_USER_REAL |
|---|
| 321 |
* owner::user-real |
|---|
| 322 |
* string |
|---|
| 323 |
* G_FILE_ATTRIBUTE_OWNER_GROUP |
|---|
| 324 |
* owner::group |
|---|
| 325 |
* string |
|---|
| 326 |
* G_FILE_ATTRIBUTE_THUMBNAIL_PATH |
|---|
| 327 |
* thumbnail::path |
|---|
| 328 |
* bytestring |
|---|
| 329 |
* G_FILE_ATTRIBUTE_THUMBNAILING_FAILED |
|---|
| 330 |
* thumbnail::failed |
|---|
| 331 |
* boolean |
|---|
| 332 |
* G_FILE_ATTRIBUTE_PREVIEW_ICON |
|---|
| 333 |
* preview::icon |
|---|
| 334 |
* object (GIcon) |
|---|
| 335 |
* G_FILE_ATTRIBUTE_FILESYSTEM_SIZE |
|---|
| 336 |
* filesystem::size |
|---|
| 337 |
* uint64 |
|---|
| 338 |
* G_FILE_ATTRIBUTE_FILESYSTEM_FREE |
|---|
| 339 |
* filesystem::free |
|---|
| 340 |
* uint64 |
|---|
| 341 |
* G_FILE_ATTRIBUTE_FILESYSTEM_TYPE |
|---|
| 342 |
* filesystem::type |
|---|
| 343 |
* string |
|---|
| 344 |
* G_FILE_ATTRIBUTE_FILESYSTEM_READONLY |
|---|
| 345 |
* filesystem::readonly |
|---|
| 346 |
* boolean |
|---|
| 347 |
* G_FILE_ATTRIBUTE_GVFS_BACKEND |
|---|
| 348 |
* gvfs::backend |
|---|
| 349 |
* string |
|---|
| 350 |
* G_FILE_ATTRIBUTE_SELINUX_CONTEXT |
|---|
| 351 |
* selinux::context |
|---|
| 352 |
* string |
|---|
| 353 |
* Note that there are no predefined keys in the "xattr" and "xattr-sys" |
|---|
| 354 |
* namespaces. Keys for the "xattr" namespace are constructed by stripping |
|---|
| 355 |
* away the "user." prefix from the extended user attribute, and prepending |
|---|
| 356 |
* "xattr::". Keys for the "xattr-sys" namespace are constructed by |
|---|
| 357 |
* concatenating "xattr-sys::" with the extended attribute name. All extended |
|---|
| 358 |
* attribute values are returned as hex-encoded strings in which bytes outside |
|---|
| 359 |
* the ASCII range are encoded as hexadecimal escape sequences of the form |
|---|
| 360 |
* \xnn. |
|---|
| 361 |
*/ |
|---|
| 362 |
public class FileAttributeInfoList |
|---|
| 363 |
{ |
|---|
| 364 |
|
|---|
| 365 |
/** the main Gtk struct */ |
|---|
| 366 |
protected GFileAttributeInfoList* gFileAttributeInfoList; |
|---|
| 367 |
|
|---|
| 368 |
|
|---|
| 369 |
public GFileAttributeInfoList* getFileAttributeInfoListStruct() |
|---|
| 370 |
{ |
|---|
| 371 |
return gFileAttributeInfoList; |
|---|
| 372 |
} |
|---|
| 373 |
|
|---|
| 374 |
|
|---|
| 375 |
/** the main Gtk struct as a void* */ |
|---|
| 376 |
protected void* getStruct() |
|---|
| 377 |
{ |
|---|
| 378 |
return cast(void*)gFileAttributeInfoList; |
|---|
| 379 |
} |
|---|
| 380 |
|
|---|
| 381 |
/** |
|---|
| 382 |
* Sets our main struct and passes it to the parent class |
|---|
| 383 |
*/ |
|---|
| 384 |
public this (GFileAttributeInfoList* gFileAttributeInfoList) |
|---|
| 385 |
{ |
|---|
| 386 |
if(gFileAttributeInfoList is null) |
|---|
| 387 |
{ |
|---|
| 388 |
this = null; |
|---|
| 389 |
return; |
|---|
| 390 |
} |
|---|
| 391 |
this.gFileAttributeInfoList = gFileAttributeInfoList; |
|---|
| 392 |
} |
|---|
| 393 |
|
|---|
| 394 |
/** |
|---|
| 395 |
*/ |
|---|
| 396 |
|
|---|
| 397 |
/** |
|---|
| 398 |
* Creates a new file attribute info list. |
|---|
| 399 |
* Throws: ConstructionException GTK+ fails to create the object. |
|---|
| 400 |
*/ |
|---|
| 401 |
public this () |
|---|
| 402 |
{ |
|---|
| 403 |
// GFileAttributeInfoList * g_file_attribute_info_list_new (void); |
|---|
| 404 |
auto p = g_file_attribute_info_list_new(); |
|---|
| 405 |
if(p is null) |
|---|
| 406 |
{ |
|---|
| 407 |
throw new ConstructionException("null returned by g_file_attribute_info_list_new()"); |
|---|
| 408 |
} |
|---|
| 409 |
this(cast(GFileAttributeInfoList*) p); |
|---|
| 410 |
} |
|---|
| 411 |
|
|---|
| 412 |
/** |
|---|
| 413 |
* References a file attribute info list. |
|---|
| 414 |
* Returns: GFileAttributeInfoList or NULL on error. |
|---|
| 415 |
*/ |
|---|
| 416 |
public FileAttributeInfoList doref() |
|---|
| 417 |
{ |
|---|
| 418 |
// GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list); |
|---|
| 419 |
auto p = g_file_attribute_info_list_ref(gFileAttributeInfoList); |
|---|
| 420 |
if(p is null) |
|---|
| 421 |
{ |
|---|
| 422 |
return null; |
|---|
| 423 |
} |
|---|
| 424 |
return new FileAttributeInfoList(cast(GFileAttributeInfoList*) p); |
|---|
| 425 |
} |
|---|
| 426 |
|
|---|
| 427 |
/** |
|---|
| 428 |
* Removes a reference from the given list. If the reference count |
|---|
| 429 |
* falls to zero, the list is deleted. |
|---|
| 430 |
*/ |
|---|
| 431 |
public void unref() |
|---|
| 432 |
{ |
|---|
| 433 |
// void g_file_attribute_info_list_unref (GFileAttributeInfoList *list); |
|---|
| 434 |
g_file_attribute_info_list_unref(gFileAttributeInfoList); |
|---|
| 435 |
} |
|---|
| 436 |
|
|---|
| 437 |
/** |
|---|
| 438 |
* Makes a duplicate of a file attribute info list. |
|---|
| 439 |
* Returns: a copy of the given list. |
|---|
| 440 |
*/ |
|---|
| 441 |
public FileAttributeInfoList dup() |
|---|
| 442 |
{ |
|---|
| 443 |
// GFileAttributeInfoList * g_file_attribute_info_list_dup (GFileAttributeInfoList *list); |
|---|
| 444 |
auto p = g_file_attribute_info_list_dup(gFileAttributeInfoList); |
|---|
| 445 |
if(p is null) |
|---|
| 446 |
{ |
|---|
| 447 |
return null; |
|---|
| 448 |
} |
|---|
| 449 |
return new FileAttributeInfoList(cast(GFileAttributeInfoList*) p); |
|---|
| 450 |
} |
|---|
| 451 |
|
|---|
| 452 |
/** |
|---|
| 453 |
* Gets the file attribute with the name name from list. |
|---|
| 454 |
* Params: |
|---|
| 455 |
* name = the name of the attribute to lookup. |
|---|
| 456 |
* Returns: a GFileAttributeInfo for the name, or NULL if an attribute isn't found. |
|---|
| 457 |
*/ |
|---|
| 458 |
public GFileAttributeInfo* lookup(string name) |
|---|
| 459 |
{ |
|---|
| 460 |
// const GFileAttributeInfo * g_file_attribute_info_list_lookup (GFileAttributeInfoList *list, const char *name); |
|---|
| 461 |
return g_file_attribute_info_list_lookup(gFileAttributeInfoList, Str.toStringz(name)); |
|---|
| 462 |
} |
|---|
| 463 |
|
|---|
| 464 |
/** |
|---|
| 465 |
* Adds a new attribute with name to the list, setting |
|---|
| 466 |
* its type and flags. |
|---|
| 467 |
* Params: |
|---|
| 468 |
* name = the name of the attribute to add. |
|---|
| 469 |
* type = the GFileAttributeType for the attribute. |
|---|
| 470 |
* flags = GFileAttributeInfoFlags for the attribute. |
|---|
| 471 |
*/ |
|---|
| 472 |
public void add(string name, GFileAttributeType type, GFileAttributeInfoFlags flags) |
|---|
| 473 |
{ |
|---|
| 474 |
// void g_file_attribute_info_list_add (GFileAttributeInfoList *list, const char *name, GFileAttributeType type, GFileAttributeInfoFlags flags); |
|---|
| 475 |
g_file_attribute_info_list_add(gFileAttributeInfoList, Str.toStringz(name), type, flags); |
|---|
| 476 |
} |
|---|
| 477 |
} |
|---|