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  = GFileInfo.html
27  * outPack = gio
28  * outFile = FileInfo
29  * strct   = GFileInfo
30  * realStrct=
31  * ctorStrct=
32  * clss    = FileInfo
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = GObject
38  * implements:
39  * prefixes:
40  * 	- g_file_info_
41  * omit structs:
42  * omit prefixes:
43  * 	- g_file_attribute_matcher_
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- glib.TimeVal
49  * 	- gobject.ObjectG
50  * 	- gio.Icon
51  * 	- gio.IconIF
52  * 	- gio.FileAttributeMatcher
53  * structWrap:
54  * 	- GFileAttributeMatcher* -> FileAttributeMatcher
55  * 	- GFileInfo* -> FileInfo
56  * 	- GIcon* -> IconIF
57  * 	- GObject* -> ObjectG
58  * 	- GTimeVal* -> TimeVal
59  * module aliases:
60  * local aliases:
61  * overrides:
62  */
63 
64 module gio.FileInfo;
65 
66 public  import gtkc.giotypes;
67 
68 private import gtkc.gio;
69 private import glib.ConstructionException;
70 private import gobject.ObjectG;
71 
72 
73 private import glib.Str;
74 private import glib.TimeVal;
75 private import gobject.ObjectG;
76 private import gio.Icon;
77 private import gio.IconIF;
78 private import gio.FileAttributeMatcher;
79 
80 
81 
82 private import gobject.ObjectG;
83 
84 /**
85  * Description
86  * Functionality for manipulating basic metadata for files. GFileInfo
87  * implements methods for getting information that all files should
88  * contain, and allows for manipulation of extended attributes.
89  * See GFileAttribute for more
90  * information on how GIO handles file attributes.
91  * To obtain a GFileInfo for a GFile, use g_file_query_info() (or its
92  * async variant). To obtain a GFileInfo for a file input or output
93  * stream, use g_file_input_stream_query_info() or
94  * g_file_output_stream_query_info() (or their async variants).
95  * To change the actual attributes of a file, you should then set the
96  * attribute in the GFileInfo and call g_file_set_attributes_from_info()
97  * or g_file_set_attributes_async() on a GFile.
98  * However, not all attributes can be changed in the file. For instance,
99  * the actual size of a file cannot be changed via g_file_info_set_size().
100  * You may call g_file_query_settable_attributes() and
101  * g_file_query_writable_namespaces() to discover the settable attributes
102  * of a particular file at runtime.
103  * GFileAttributeMatcher allows for searching through a GFileInfo for
104  * attributes.
105  */
106 public class FileInfo : ObjectG
107 {
108 	
109 	/** the main Gtk struct */
110 	protected GFileInfo* gFileInfo;
111 	
112 	
113 	public GFileInfo* getFileInfoStruct()
114 	{
115 		return gFileInfo;
116 	}
117 	
118 	
119 	/** the main Gtk struct as a void* */
120 	protected override void* getStruct()
121 	{
122 		return cast(void*)gFileInfo;
123 	}
124 	
125 	/**
126 	 * Sets our main struct and passes it to the parent class
127 	 */
128 	public this (GFileInfo* gFileInfo)
129 	{
130 		super(cast(GObject*)gFileInfo);
131 		this.gFileInfo = gFileInfo;
132 	}
133 	
134 	protected override void setStruct(GObject* obj)
135 	{
136 		super.setStruct(obj);
137 		gFileInfo = cast(GFileInfo*)obj;
138 	}
139 	
140 	/**
141 	 */
142 	
143 	/**
144 	 * Creates a new file info structure.
145 	 * Throws: ConstructionException GTK+ fails to create the object.
146 	 */
147 	public this ()
148 	{
149 		// GFileInfo * g_file_info_new (void);
150 		auto p = g_file_info_new();
151 		if(p is null)
152 		{
153 			throw new ConstructionException("null returned by g_file_info_new()");
154 		}
155 		this(cast(GFileInfo*) p);
156 	}
157 	
158 	/**
159 	 * Duplicates a file info structure.
160 	 * Returns: a duplicate GFileInfo of other. [transfer full]
161 	 */
162 	public FileInfo dup()
163 	{
164 		// GFileInfo * g_file_info_dup (GFileInfo *other);
165 		auto p = g_file_info_dup(gFileInfo);
166 		
167 		if(p is null)
168 		{
169 			return null;
170 		}
171 		
172 		return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p);
173 	}
174 	
175 	/**
176 	 * Copies all of the GFileAttributes from src_info to dest_info.
177 	 * Params:
178 	 * destInfo = destination to copy attributes to.
179 	 */
180 	public void copyInto(FileInfo destInfo)
181 	{
182 		// void g_file_info_copy_into (GFileInfo *src_info,  GFileInfo *dest_info);
183 		g_file_info_copy_into(gFileInfo, (destInfo is null) ? null : destInfo.getFileInfoStruct());
184 	}
185 	
186 	/**
187 	 * Checks if a file info structure has an attribute named attribute.
188 	 * Params:
189 	 * attribute = a file attribute key.
190 	 * Returns: TRUE if Ginfo has an attribute named attribute, FALSE otherwise.
191 	 */
192 	public int hasAttribute(string attribute)
193 	{
194 		// gboolean g_file_info_has_attribute (GFileInfo *info,  const char *attribute);
195 		return g_file_info_has_attribute(gFileInfo, Str.toStringz(attribute));
196 	}
197 	
198 	/**
199 	 * Checks if a file info structure has an attribute in the
200 	 * specified name_space.
201 	 * Since 2.22
202 	 * Params:
203 	 * nameSpace = a file attribute namespace.
204 	 * Returns: TRUE if Ginfo has an attribute in name_space, FALSE otherwise.
205 	 */
206 	public int hasNamespace(string nameSpace)
207 	{
208 		// gboolean g_file_info_has_namespace (GFileInfo *info,  const char *name_space);
209 		return g_file_info_has_namespace(gFileInfo, Str.toStringz(nameSpace));
210 	}
211 	
212 	/**
213 	 * Lists the file info structure's attributes.
214 	 * Params:
215 	 * nameSpace = a file attribute key's namespace.
216 	 * Returns: a null-terminated array of strings of all of the possible attribute types for the given name_space, or NULL on error. [array zero-terminated=1][transfer full]
217 	 */
218 	public string[] listAttributes(string nameSpace)
219 	{
220 		// char ** g_file_info_list_attributes (GFileInfo *info,  const char *name_space);
221 		return Str.toStringArray(g_file_info_list_attributes(gFileInfo, Str.toStringz(nameSpace)));
222 	}
223 	
224 	/**
225 	 * Gets the attribute type for an attribute key.
226 	 * Params:
227 	 * attribute = a file attribute key.
228 	 * Returns: a GFileAttributeType for the given attribute, or G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
229 	 */
230 	public GFileAttributeType getAttributeType(string attribute)
231 	{
232 		// GFileAttributeType g_file_info_get_attribute_type (GFileInfo *info,  const char *attribute);
233 		return g_file_info_get_attribute_type(gFileInfo, Str.toStringz(attribute));
234 	}
235 	
236 	/**
237 	 * Removes all cases of attribute from info if it exists.
238 	 * Params:
239 	 * attribute = a file attribute key.
240 	 */
241 	public void removeAttribute(string attribute)
242 	{
243 		// void g_file_info_remove_attribute (GFileInfo *info,  const char *attribute);
244 		g_file_info_remove_attribute(gFileInfo, Str.toStringz(attribute));
245 	}
246 	
247 	/**
248 	 * Gets the value of a attribute, formated as a string.
249 	 * This escapes things as needed to make the string valid
250 	 * utf8.
251 	 * Params:
252 	 * attribute = a file attribute key.
253 	 * Returns: a UTF-8 string associated with the given attribute. When you're done with the string it must be freed with g_free().
254 	 */
255 	public string getAttributeAsString(string attribute)
256 	{
257 		// char * g_file_info_get_attribute_as_string (GFileInfo *info,  const char *attribute);
258 		return Str.toString(g_file_info_get_attribute_as_string(gFileInfo, Str.toStringz(attribute)));
259 	}
260 	
261 	/**
262 	 * Gets the attribute type, value and status for an attribute key.
263 	 * Params:
264 	 * attribute = a file attribute key
265 	 * type = return location for the attribute type, or NULL. [out][allow-none]
266 	 * valuePp = return location for the attribute value, or NULL. [out][allow-none]
267 	 * status = return location for the attribute status, or NULL. [out][allow-none]
268 	 * Returns: TRUE if info has an attribute named attribute, FALSE otherwise. [transfer none]
269 	 */
270 	public int getAttributeData(string attribute, out GFileAttributeType type, out void* valuePp, out GFileAttributeStatus status)
271 	{
272 		// gboolean g_file_info_get_attribute_data (GFileInfo *info,  const char *attribute,  GFileAttributeType *type,  gpointer *value_pp,  GFileAttributeStatus *status);
273 		return g_file_info_get_attribute_data(gFileInfo, Str.toStringz(attribute), &type, &valuePp, &status);
274 	}
275 	
276 	/**
277 	 * Gets the attribute status for an attribute key.
278 	 * Params:
279 	 * attribute = a file attribute key
280 	 * Returns: a GFileAttributeStatus for the given attribute, or G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
281 	 */
282 	public GFileAttributeStatus getAttributeStatus(string attribute)
283 	{
284 		// GFileAttributeStatus g_file_info_get_attribute_status (GFileInfo *info,  const char *attribute);
285 		return g_file_info_get_attribute_status(gFileInfo, Str.toStringz(attribute));
286 	}
287 	
288 	/**
289 	 * Gets the value of a string attribute. If the attribute does
290 	 * not contain a string, NULL will be returned.
291 	 * Params:
292 	 * attribute = a file attribute key.
293 	 * Returns: the contents of the attribute value as a string, or NULL otherwise.
294 	 */
295 	public string getAttributeString(string attribute)
296 	{
297 		// const char * g_file_info_get_attribute_string (GFileInfo *info,  const char *attribute);
298 		return Str.toString(g_file_info_get_attribute_string(gFileInfo, Str.toStringz(attribute)));
299 	}
300 	
301 	/**
302 	 * Gets the value of a stringv attribute. If the attribute does
303 	 * not contain a stringv, NULL will be returned.
304 	 * Since 2.22
305 	 * Params:
306 	 * attribute = a file attribute key.
307 	 * Returns: the contents of the attribute value as a stringv, or NULL otherwise. Do not free. [transfer none]
308 	 */
309 	public string[] getAttributeStringv(string attribute)
310 	{
311 		// char ** g_file_info_get_attribute_stringv (GFileInfo *info,  const char *attribute);
312 		return Str.toStringArray(g_file_info_get_attribute_stringv(gFileInfo, Str.toStringz(attribute)));
313 	}
314 	
315 	/**
316 	 * Gets the value of a byte string attribute. If the attribute does
317 	 * not contain a byte string, NULL will be returned.
318 	 * Params:
319 	 * attribute = a file attribute key.
320 	 * Returns: the contents of the attribute value as a byte string, or NULL otherwise.
321 	 */
322 	public string getAttributeByteString(string attribute)
323 	{
324 		// const char * g_file_info_get_attribute_byte_string  (GFileInfo *info,  const char *attribute);
325 		return Str.toString(g_file_info_get_attribute_byte_string(gFileInfo, Str.toStringz(attribute)));
326 	}
327 	
328 	/**
329 	 * Gets the value of a boolean attribute. If the attribute does not
330 	 * contain a boolean value, FALSE will be returned.
331 	 * Params:
332 	 * attribute = a file attribute key.
333 	 * Returns: the boolean value contained within the attribute.
334 	 */
335 	public int getAttributeBoolean(string attribute)
336 	{
337 		// gboolean g_file_info_get_attribute_boolean (GFileInfo *info,  const char *attribute);
338 		return g_file_info_get_attribute_boolean(gFileInfo, Str.toStringz(attribute));
339 	}
340 	
341 	/**
342 	 * Gets an unsigned 32-bit integer contained within the attribute. If the
343 	 * attribute does not contain an unsigned 32-bit integer, or is invalid,
344 	 * 0 will be returned.
345 	 * Params:
346 	 * attribute = a file attribute key.
347 	 * Returns: an unsigned 32-bit integer from the attribute.
348 	 */
349 	public uint getAttributeUint32(string attribute)
350 	{
351 		// guint32 g_file_info_get_attribute_uint32 (GFileInfo *info,  const char *attribute);
352 		return g_file_info_get_attribute_uint32(gFileInfo, Str.toStringz(attribute));
353 	}
354 	
355 	/**
356 	 * Gets a signed 32-bit integer contained within the attribute. If the
357 	 * attribute does not contain a signed 32-bit integer, or is invalid,
358 	 * 0 will be returned.
359 	 * Params:
360 	 * attribute = a file attribute key.
361 	 * Returns: a signed 32-bit integer from the attribute.
362 	 */
363 	public int getAttributeInt32(string attribute)
364 	{
365 		// gint32 g_file_info_get_attribute_int32 (GFileInfo *info,  const char *attribute);
366 		return g_file_info_get_attribute_int32(gFileInfo, Str.toStringz(attribute));
367 	}
368 	
369 	/**
370 	 * Gets a unsigned 64-bit integer contained within the attribute. If the
371 	 * attribute does not contain an unsigned 64-bit integer, or is invalid,
372 	 * 0 will be returned.
373 	 * Params:
374 	 * attribute = a file attribute key.
375 	 * Returns: a unsigned 64-bit integer from the attribute.
376 	 */
377 	public ulong getAttributeUint64(string attribute)
378 	{
379 		// guint64 g_file_info_get_attribute_uint64 (GFileInfo *info,  const char *attribute);
380 		return g_file_info_get_attribute_uint64(gFileInfo, Str.toStringz(attribute));
381 	}
382 	
383 	/**
384 	 * Gets a signed 64-bit integer contained within the attribute. If the
385 	 * attribute does not contain an signed 64-bit integer, or is invalid,
386 	 * 0 will be returned.
387 	 * Params:
388 	 * attribute = a file attribute key.
389 	 * Returns: a signed 64-bit integer from the attribute.
390 	 */
391 	public long getAttributeInt64(string attribute)
392 	{
393 		// gint64 g_file_info_get_attribute_int64 (GFileInfo *info,  const char *attribute);
394 		return g_file_info_get_attribute_int64(gFileInfo, Str.toStringz(attribute));
395 	}
396 	
397 	/**
398 	 * Gets the value of a GObject attribute. If the attribute does
399 	 * not contain a GObject, NULL will be returned.
400 	 * Params:
401 	 * attribute = a file attribute key.
402 	 * Returns: a GObject associated with the given attribute, or NULL otherwise. [transfer none]
403 	 */
404 	public ObjectG getAttributeObject(string attribute)
405 	{
406 		// GObject * g_file_info_get_attribute_object (GFileInfo *info,  const char *attribute);
407 		auto p = g_file_info_get_attribute_object(gFileInfo, Str.toStringz(attribute));
408 		
409 		if(p is null)
410 		{
411 			return null;
412 		}
413 		
414 		return ObjectG.getDObject!(ObjectG)(cast(GObject*) p);
415 	}
416 	
417 	/**
418 	 * Sets the attribute to contain the given value, if possible.
419 	 * Params:
420 	 * attribute = a file attribute key.
421 	 * type = a GFileAttributeType
422 	 * valueP = pointer to the value
423 	 */
424 	public void setAttribute(string attribute, GFileAttributeType type, void* valueP)
425 	{
426 		// void g_file_info_set_attribute (GFileInfo *info,  const char *attribute,  GFileAttributeType type,  gpointer value_p);
427 		g_file_info_set_attribute(gFileInfo, Str.toStringz(attribute), type, valueP);
428 	}
429 	
430 	/**
431 	 * Sets the attribute status for an attribute key. This is only
432 	 * needed by external code that implement g_file_set_attributes_from_info()
433 	 * or similar functions.
434 	 * The attribute must exist in info for this to work. Otherwise FALSE
435 	 * is returned and info is unchanged.
436 	 * Since 2.22
437 	 * Params:
438 	 * attribute = a file attribute key
439 	 * status = a GFileAttributeStatus
440 	 * Returns: TRUE if the status was changed, FALSE if the key was not set.
441 	 */
442 	public int setAttributeStatus(string attribute, GFileAttributeStatus status)
443 	{
444 		// gboolean g_file_info_set_attribute_status (GFileInfo *info,  const char *attribute,  GFileAttributeStatus status);
445 		return g_file_info_set_attribute_status(gFileInfo, Str.toStringz(attribute), status);
446 	}
447 	
448 	/**
449 	 * Sets the attribute to contain the given attr_value,
450 	 * if possible.
451 	 * Params:
452 	 * attribute = a file attribute key.
453 	 * attrValue = a string.
454 	 */
455 	public void setAttributeString(string attribute, string attrValue)
456 	{
457 		// void g_file_info_set_attribute_string (GFileInfo *info,  const char *attribute,  const char *attr_value);
458 		g_file_info_set_attribute_string(gFileInfo, Str.toStringz(attribute), Str.toStringz(attrValue));
459 	}
460 	
461 	/**
462 	 * Sets the attribute to contain the given attr_value,
463 	 * if possible.
464 	 * Sinze: 2.22
465 	 * Params:
466 	 * attribute = a file attribute key.
467 	 * attrValue = a NULL terminated string array
468 	 */
469 	public void setAttributeStringv(string attribute, string[] attrValue)
470 	{
471 		// void g_file_info_set_attribute_stringv (GFileInfo *info,  const char *attribute,  char **attr_value);
472 		g_file_info_set_attribute_stringv(gFileInfo, Str.toStringz(attribute), Str.toStringzArray(attrValue));
473 	}
474 	
475 	/**
476 	 * Sets the attribute to contain the given attr_value,
477 	 * if possible.
478 	 * Params:
479 	 * attribute = a file attribute key.
480 	 * attrValue = a byte string.
481 	 */
482 	public void setAttributeByteString(string attribute, string attrValue)
483 	{
484 		// void g_file_info_set_attribute_byte_string  (GFileInfo *info,  const char *attribute,  const char *attr_value);
485 		g_file_info_set_attribute_byte_string(gFileInfo, Str.toStringz(attribute), Str.toStringz(attrValue));
486 	}
487 	
488 	/**
489 	 * Sets the attribute to contain the given attr_value,
490 	 * if possible.
491 	 * Params:
492 	 * attribute = a file attribute key.
493 	 * attrValue = a boolean value.
494 	 */
495 	public void setAttributeBoolean(string attribute, int attrValue)
496 	{
497 		// void g_file_info_set_attribute_boolean (GFileInfo *info,  const char *attribute,  gboolean attr_value);
498 		g_file_info_set_attribute_boolean(gFileInfo, Str.toStringz(attribute), attrValue);
499 	}
500 	
501 	/**
502 	 * Sets the attribute to contain the given attr_value,
503 	 * if possible.
504 	 * Params:
505 	 * attribute = a file attribute key.
506 	 * attrValue = an unsigned 32-bit integer.
507 	 */
508 	public void setAttributeUint32(string attribute, uint attrValue)
509 	{
510 		// void g_file_info_set_attribute_uint32 (GFileInfo *info,  const char *attribute,  guint32 attr_value);
511 		g_file_info_set_attribute_uint32(gFileInfo, Str.toStringz(attribute), attrValue);
512 	}
513 	
514 	/**
515 	 * Sets the attribute to contain the given attr_value,
516 	 * if possible.
517 	 * Params:
518 	 * attribute = a file attribute key.
519 	 * attrValue = a signed 32-bit integer
520 	 */
521 	public void setAttributeInt32(string attribute, int attrValue)
522 	{
523 		// void g_file_info_set_attribute_int32 (GFileInfo *info,  const char *attribute,  gint32 attr_value);
524 		g_file_info_set_attribute_int32(gFileInfo, Str.toStringz(attribute), attrValue);
525 	}
526 	
527 	/**
528 	 * Sets the attribute to contain the given attr_value,
529 	 * if possible.
530 	 * Params:
531 	 * attribute = a file attribute key.
532 	 * attrValue = an unsigned 64-bit integer.
533 	 */
534 	public void setAttributeUint64(string attribute, ulong attrValue)
535 	{
536 		// void g_file_info_set_attribute_uint64 (GFileInfo *info,  const char *attribute,  guint64 attr_value);
537 		g_file_info_set_attribute_uint64(gFileInfo, Str.toStringz(attribute), attrValue);
538 	}
539 	
540 	/**
541 	 * Sets the attribute to contain the given attr_value,
542 	 * if possible.
543 	 * Params:
544 	 * attribute = attribute name to set.
545 	 * attrValue = int64 value to set attribute to.
546 	 */
547 	public void setAttributeInt64(string attribute, long attrValue)
548 	{
549 		// void g_file_info_set_attribute_int64 (GFileInfo *info,  const char *attribute,  gint64 attr_value);
550 		g_file_info_set_attribute_int64(gFileInfo, Str.toStringz(attribute), attrValue);
551 	}
552 	
553 	/**
554 	 * Sets the attribute to contain the given attr_value,
555 	 * if possible.
556 	 * Params:
557 	 * attribute = a file attribute key.
558 	 * attrValue = a GObject.
559 	 */
560 	public void setAttributeObject(string attribute, ObjectG attrValue)
561 	{
562 		// void g_file_info_set_attribute_object (GFileInfo *info,  const char *attribute,  GObject *attr_value);
563 		g_file_info_set_attribute_object(gFileInfo, Str.toStringz(attribute), (attrValue is null) ? null : attrValue.getObjectGStruct());
564 	}
565 	
566 	/**
567 	 * Clears the status information from info.
568 	 */
569 	public void clearStatus()
570 	{
571 		// void g_file_info_clear_status (GFileInfo *info);
572 		g_file_info_clear_status(gFileInfo);
573 	}
574 	
575 	/**
576 	 * Gets a file's type (whether it is a regular file, symlink, etc).
577 	 * This is different from the file's content type, see g_file_info_get_content_type().
578 	 * Returns: a GFileType for the given file.
579 	 */
580 	public GFileType getFileType()
581 	{
582 		// GFileType g_file_info_get_file_type (GFileInfo *info);
583 		return g_file_info_get_file_type(gFileInfo);
584 	}
585 	
586 	/**
587 	 * Checks if a file is hidden.
588 	 * Returns: TRUE if the file is a hidden file, FALSE otherwise.
589 	 */
590 	public int getIsHidden()
591 	{
592 		// gboolean g_file_info_get_is_hidden (GFileInfo *info);
593 		return g_file_info_get_is_hidden(gFileInfo);
594 	}
595 	
596 	/**
597 	 * Checks if a file is a backup file.
598 	 * Returns: TRUE if file is a backup file, FALSE otherwise.
599 	 */
600 	public int getIsBackup()
601 	{
602 		// gboolean g_file_info_get_is_backup (GFileInfo *info);
603 		return g_file_info_get_is_backup(gFileInfo);
604 	}
605 	
606 	/**
607 	 * Checks if a file is a symlink.
608 	 * Returns: TRUE if the given info is a symlink.
609 	 */
610 	public int getIsSymlink()
611 	{
612 		// gboolean g_file_info_get_is_symlink (GFileInfo *info);
613 		return g_file_info_get_is_symlink(gFileInfo);
614 	}
615 	
616 	/**
617 	 * Gets the name for a file.
618 	 * Returns: a string containing the file name.
619 	 */
620 	public string getName()
621 	{
622 		// const char * g_file_info_get_name (GFileInfo *info);
623 		return Str.toString(g_file_info_get_name(gFileInfo));
624 	}
625 	
626 	/**
627 	 * Gets a display name for a file.
628 	 * Returns: a string containing the display name.
629 	 */
630 	public string getDisplayName()
631 	{
632 		// const char * g_file_info_get_display_name (GFileInfo *info);
633 		return Str.toString(g_file_info_get_display_name(gFileInfo));
634 	}
635 	
636 	/**
637 	 * Gets the edit name for a file.
638 	 * Returns: a string containing the edit name.
639 	 */
640 	public string getEditName()
641 	{
642 		// const char * g_file_info_get_edit_name (GFileInfo *info);
643 		return Str.toString(g_file_info_get_edit_name(gFileInfo));
644 	}
645 	
646 	/**
647 	 * Gets the icon for a file.
648 	 * Returns: GIcon for the given info. [transfer none]
649 	 */
650 	public IconIF getIcon()
651 	{
652 		// GIcon * g_file_info_get_icon (GFileInfo *info);
653 		auto p = g_file_info_get_icon(gFileInfo);
654 		
655 		if(p is null)
656 		{
657 			return null;
658 		}
659 		
660 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
661 	}
662 	
663 	/**
664 	 * Gets the file's content type.
665 	 * Returns: a string containing the file's content type.
666 	 */
667 	public string getContentType()
668 	{
669 		// const char * g_file_info_get_content_type (GFileInfo *info);
670 		return Str.toString(g_file_info_get_content_type(gFileInfo));
671 	}
672 	
673 	/**
674 	 * Gets the file's size.
675 	 * Returns: a goffset containing the file's size.
676 	 */
677 	public long getSize()
678 	{
679 		// goffset g_file_info_get_size (GFileInfo *info);
680 		return g_file_info_get_size(gFileInfo);
681 	}
682 	
683 	/**
684 	 * Gets the modification time of the current info and sets it
685 	 * in result.
686 	 * Params:
687 	 * result = a GTimeVal.
688 	 */
689 	public void getModificationTime(TimeVal result)
690 	{
691 		// void g_file_info_get_modification_time (GFileInfo *info,  GTimeVal *result);
692 		g_file_info_get_modification_time(gFileInfo, (result is null) ? null : result.getTimeValStruct());
693 	}
694 	
695 	/**
696 	 * Gets the symlink target for a given GFileInfo.
697 	 * Returns: a string containing the symlink target.
698 	 */
699 	public string getSymlinkTarget()
700 	{
701 		// const char * g_file_info_get_symlink_target (GFileInfo *info);
702 		return Str.toString(g_file_info_get_symlink_target(gFileInfo));
703 	}
704 	
705 	/**
706 	 * Gets the entity tag for a given
707 	 * GFileInfo. See G_FILE_ATTRIBUTE_ETAG_VALUE.
708 	 * Returns: a string containing the value of the "etag:value" attribute.
709 	 */
710 	public string getEtag()
711 	{
712 		// const char * g_file_info_get_etag (GFileInfo *info);
713 		return Str.toString(g_file_info_get_etag(gFileInfo));
714 	}
715 	
716 	/**
717 	 * Gets the value of the sort_order attribute from the GFileInfo.
718 	 * See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
719 	 * Returns: a gint32 containing the value of the "standard::sort_order" attribute.
720 	 */
721 	public int getSortOrder()
722 	{
723 		// gint32 g_file_info_get_sort_order (GFileInfo *info);
724 		return g_file_info_get_sort_order(gFileInfo);
725 	}
726 	
727 	/**
728 	 * Sets mask on info to match specific attribute types.
729 	 * Params:
730 	 * mask = a GFileAttributeMatcher.
731 	 */
732 	public void setAttributeMask(FileAttributeMatcher mask)
733 	{
734 		// void g_file_info_set_attribute_mask (GFileInfo *info,  GFileAttributeMatcher *mask);
735 		g_file_info_set_attribute_mask(gFileInfo, (mask is null) ? null : mask.getFileAttributeMatcherStruct());
736 	}
737 	
738 	/**
739 	 * Unsets a mask set by g_file_info_set_attribute_mask(), if one
740 	 * is set.
741 	 */
742 	public void unsetAttributeMask()
743 	{
744 		// void g_file_info_unset_attribute_mask (GFileInfo *info);
745 		g_file_info_unset_attribute_mask(gFileInfo);
746 	}
747 	
748 	/**
749 	 * Sets the file type in a GFileInfo to type.
750 	 * See G_FILE_ATTRIBUTE_STANDARD_TYPE.
751 	 * Params:
752 	 * type = a GFileType.
753 	 */
754 	public void setFileType(GFileType type)
755 	{
756 		// void g_file_info_set_file_type (GFileInfo *info,  GFileType type);
757 		g_file_info_set_file_type(gFileInfo, type);
758 	}
759 	
760 	/**
761 	 * Sets the "is_hidden" attribute in a GFileInfo according to is_symlink.
762 	 * See G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
763 	 * Params:
764 	 * isHidden = a gboolean.
765 	 */
766 	public void setIsHidden(int isHidden)
767 	{
768 		// void g_file_info_set_is_hidden (GFileInfo *info,  gboolean is_hidden);
769 		g_file_info_set_is_hidden(gFileInfo, isHidden);
770 	}
771 	
772 	/**
773 	 * Sets the "is_symlink" attribute in a GFileInfo according to is_symlink.
774 	 * See G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
775 	 * Params:
776 	 * isSymlink = a gboolean.
777 	 */
778 	public void setIsSymlink(int isSymlink)
779 	{
780 		// void g_file_info_set_is_symlink (GFileInfo *info,  gboolean is_symlink);
781 		g_file_info_set_is_symlink(gFileInfo, isSymlink);
782 	}
783 	
784 	/**
785 	 * Sets the name attribute for the current GFileInfo.
786 	 * See G_FILE_ATTRIBUTE_STANDARD_NAME.
787 	 * Params:
788 	 * name = a string containing a name.
789 	 */
790 	public void setName(string name)
791 	{
792 		// void g_file_info_set_name (GFileInfo *info,  const char *name);
793 		g_file_info_set_name(gFileInfo, Str.toStringz(name));
794 	}
795 	
796 	/**
797 	 * Sets the display name for the current GFileInfo.
798 	 * See G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
799 	 * Params:
800 	 * displayName = a string containing a display name.
801 	 */
802 	public void setDisplayName(string displayName)
803 	{
804 		// void g_file_info_set_display_name (GFileInfo *info,  const char *display_name);
805 		g_file_info_set_display_name(gFileInfo, Str.toStringz(displayName));
806 	}
807 	
808 	/**
809 	 * Sets the edit name for the current file.
810 	 * See G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
811 	 * Params:
812 	 * editName = a string containing an edit name.
813 	 */
814 	public void setEditName(string editName)
815 	{
816 		// void g_file_info_set_edit_name (GFileInfo *info,  const char *edit_name);
817 		g_file_info_set_edit_name(gFileInfo, Str.toStringz(editName));
818 	}
819 	
820 	/**
821 	 * Sets the icon for a given GFileInfo.
822 	 * See G_FILE_ATTRIBUTE_STANDARD_ICON.
823 	 * Params:
824 	 * icon = a GIcon.
825 	 */
826 	public void setIcon(IconIF icon)
827 	{
828 		// void g_file_info_set_icon (GFileInfo *info,  GIcon *icon);
829 		g_file_info_set_icon(gFileInfo, (icon is null) ? null : icon.getIconTStruct());
830 	}
831 	
832 	/**
833 	 * Sets the content type attribute for a given GFileInfo.
834 	 * See G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
835 	 * Params:
836 	 * contentType = a content type. See GContentType.
837 	 */
838 	public void setContentType(string contentType)
839 	{
840 		// void g_file_info_set_content_type (GFileInfo *info,  const char *content_type);
841 		g_file_info_set_content_type(gFileInfo, Str.toStringz(contentType));
842 	}
843 	
844 	/**
845 	 * Sets the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
846 	 * to the given size.
847 	 * Params:
848 	 * size = a goffset containing the file's size.
849 	 */
850 	public void setSize(long size)
851 	{
852 		// void g_file_info_set_size (GFileInfo *info,  goffset size);
853 		g_file_info_set_size(gFileInfo, size);
854 	}
855 	
856 	/**
857 	 * Sets the G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
858 	 * info to the given time value.
859 	 * Params:
860 	 * mtime = a GTimeVal.
861 	 */
862 	public void setModificationTime(TimeVal mtime)
863 	{
864 		// void g_file_info_set_modification_time (GFileInfo *info,  GTimeVal *mtime);
865 		g_file_info_set_modification_time(gFileInfo, (mtime is null) ? null : mtime.getTimeValStruct());
866 	}
867 	
868 	/**
869 	 * Sets the G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
870 	 * to the given symlink target.
871 	 * Params:
872 	 * symlinkTarget = a static string containing a path to a symlink target.
873 	 */
874 	public void setSymlinkTarget(string symlinkTarget)
875 	{
876 		// void g_file_info_set_symlink_target (GFileInfo *info,  const char *symlink_target);
877 		g_file_info_set_symlink_target(gFileInfo, Str.toStringz(symlinkTarget));
878 	}
879 	
880 	/**
881 	 * Sets the sort order attribute in the file info structure. See
882 	 * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
883 	 * Params:
884 	 * sortOrder = a sort order integer.
885 	 */
886 	public void setSortOrder(int sortOrder)
887 	{
888 		// void g_file_info_set_sort_order (GFileInfo *info,  gint32 sort_order);
889 		g_file_info_set_sort_order(gFileInfo, sortOrder);
890 	}
891 }