mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-18 11:41:58 +02:00
docs: Move the GFileInfo SECTION
Move it to the struct docs. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk> Helps: #3037
This commit is contained in:
parent
eefda8158e
commit
34bb869da1
@ -21,45 +21,44 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gfileinfo
|
* GFileInfo:
|
||||||
* @short_description: File Information and Attributes
|
|
||||||
* @include: gio/gio.h
|
|
||||||
* @see_also: #GFile, [GFileAttribute][gio-GFileAttribute]
|
|
||||||
*
|
*
|
||||||
* Functionality for manipulating basic metadata for files. #GFileInfo
|
* Stores information about a file system object referenced by a [iface@Gio.File].
|
||||||
|
*
|
||||||
|
* Functionality for manipulating basic metadata for files. `GFileInfo`
|
||||||
* implements methods for getting information that all files should
|
* implements methods for getting information that all files should
|
||||||
* contain, and allows for manipulation of extended attributes.
|
* contain, and allows for manipulation of extended attributes.
|
||||||
*
|
*
|
||||||
* See [GFileAttribute][gio-GFileAttribute] for more information on how
|
* See [file-attributes.html](file attributes) for more information on how GIO
|
||||||
* GIO handles file attributes.
|
* handles file attributes.
|
||||||
*
|
*
|
||||||
* To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
|
* To obtain a `GFileInfo` for a [iface@Gio.File], use
|
||||||
* async variant). To obtain a #GFileInfo for a file input or output
|
* [method@Gio.File.query_info] (or its async variant). To obtain a `GFileInfo`
|
||||||
* stream, use g_file_input_stream_query_info() or
|
* for a file input or output stream, use [method@Gio.FileInputStream.query_info]
|
||||||
* g_file_output_stream_query_info() (or their async variants).
|
* or [method@Gio.FileOutputStream.query_info] (or their async variants).
|
||||||
*
|
*
|
||||||
* To change the actual attributes of a file, you should then set the
|
* To change the actual attributes of a file, you should then set the
|
||||||
* attribute in the #GFileInfo and call g_file_set_attributes_from_info()
|
* attribute in the `GFileInfo` and call [method@Gio.File.set_attributes_from_info]
|
||||||
* or g_file_set_attributes_async() on a GFile.
|
* or [method@Gio.File.set_attributes_async] on a `GFile`.
|
||||||
*
|
*
|
||||||
* However, not all attributes can be changed in the file. For instance,
|
* However, not all attributes can be changed in the file. For instance,
|
||||||
* the actual size of a file cannot be changed via g_file_info_set_size().
|
* the actual size of a file cannot be changed via [method@Gio.FileInfo.set_size].
|
||||||
* You may call g_file_query_settable_attributes() and
|
* You may call [method@Gio.File.query_settable_attributes] and
|
||||||
* g_file_query_writable_namespaces() to discover the settable attributes
|
* [method@Gio.File.query_writable_namespaces] to discover the settable attributes
|
||||||
* of a particular file at runtime.
|
* of a particular file at runtime.
|
||||||
*
|
*
|
||||||
* The direct accessors, such as g_file_info_get_name(), are slightly more
|
* The direct accessors, such as [method@Gio.FileInfo.get_name], are slightly more
|
||||||
* optimized than the generic attribute accessors, such as
|
* optimized than the generic attribute accessors, such as
|
||||||
* g_file_info_get_attribute_byte_string().This optimization will matter
|
* [method@Gio.FileInfo.get_attribute_byte_string].This optimization will matter
|
||||||
* only if calling the API in a tight loop.
|
* only if calling the API in a tight loop.
|
||||||
*
|
*
|
||||||
* It is an error to call these accessors without specifying their required file
|
* It is an error to call these accessors without specifying their required file
|
||||||
* attributes when creating the #GFileInfo. Use g_file_info_has_attribute() or
|
* attributes when creating the `GFileInfo`. Use
|
||||||
* g_file_info_list_attributes() to check what attributes are specified for a
|
* [method@Gio.FileInfo.has_attribute] or [method@Gio.FileInfo.list_attributes]
|
||||||
* #GFileInfo.
|
* to check what attributes are specified for a `GFileInfo`.
|
||||||
*
|
*
|
||||||
* #GFileAttributeMatcher allows for searching through a #GFileInfo for
|
* [struct@Gio.FileAttributeMatcher] allows for searching through a `GFileInfo`
|
||||||
* attributes.
|
* for attributes.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -38,11 +38,6 @@ G_BEGIN_DECLS
|
|||||||
#define G_IS_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), 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))
|
#define G_FILE_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INFO, GFileInfoClass))
|
||||||
|
|
||||||
/**
|
|
||||||
* GFileInfo:
|
|
||||||
*
|
|
||||||
* Stores information about a file system object referenced by a #GFile.
|
|
||||||
**/
|
|
||||||
typedef struct _GFileInfoClass GFileInfoClass;
|
typedef struct _GFileInfoClass GFileInfoClass;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user