package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.File_info

type t = [ `file_info | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new FileInfo

val unset_attribute_mask : t -> unit

Unsets a mask set by g_file_info_set_attribute_mask(), if one is set.

Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info to the given symlink target.

val set_symbolic_icon : t -> [ `icon ] Gobject.obj -> unit

Sets the symbolic icon for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.

val set_sort_order : t -> Int32.t -> unit

Sets the sort order attribute in the file info structure. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

val set_size : t -> int64 -> unit

Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info to the given size.

val set_name : t -> string -> unit

Sets the name attribute for the current #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_NAME.

Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink. See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

val set_is_hidden : t -> bool -> unit

Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden. See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

val set_icon : t -> [ `icon ] Gobject.obj -> unit

Sets the icon for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_ICON.

val set_file_type : t -> Gio_enums.filetype -> unit

Sets the file type in a #GFileInfo to @type. See %G_FILE_ATTRIBUTE_STANDARD_TYPE.

val set_edit_name : t -> string -> unit

Sets the edit name for the current file. See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.

val set_display_name : t -> string -> unit

Sets the display name for the current #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

val set_content_type : t -> string -> unit

Sets the content type attribute for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

val set_attribute_uint64 : t -> string -> UInt64.t -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_uint32 : t -> string -> UInt32.t -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_stringv : t -> string -> string array -> unit

Sets the @attribute to contain the given @attr_value, if possible.

Sinze: 2.22

val set_attribute_string : t -> string -> string -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_status : t -> string -> Gio_enums.fileattributestatus -> bool

Sets the attribute status for an attribute key. This is only needed by external code that implement g_file_set_attributes_from_info() or similar functions.

The attribute must exist in @info for this to work. Otherwise %FALSE is returned and @info is unchanged.

val set_attribute_object : t -> string -> [ `object_ ] Gobject.obj -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_mask : t -> [ `file_attribute_matcher ] Gobject.obj -> unit

Sets @mask on @info to match specific attribute types.

val set_attribute_int64 : t -> string -> int64 -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_int32 : t -> string -> Int32.t -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_file_path : t -> string -> string -> unit

Sets the @attribute to contain the given @attr_value, if possible.

This function is meant to be used by language bindings that have specific handling for Unix paths.

val set_attribute_byte_string : t -> string -> string -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val set_attribute_boolean : t -> string -> bool -> unit

Sets the @attribute to contain the given @attr_value, if possible.

val remove_attribute : t -> string -> unit

Removes all cases of @attribute from @info if it exists.

val list_attributes : t -> string option -> string array option

Lists the file info structure's attributes.

val has_namespace : t -> string -> bool

Checks if a file info structure has an attribute in the specified @name_space.

val has_attribute : t -> string -> bool

Checks if a file info structure has an attribute named @attribute.

Gets the symlink target for a given #GFileInfo.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET.

val get_symbolic_icon : t -> [ `icon ] Gobject.obj option

Gets the symbolic icon for a file.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.

val get_sort_order : t -> Int32.t

Gets the value of the sort_order attribute from the #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

val get_size : t -> int64

Gets the file's size (in bytes). The size is retrieved through the value of the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute and is converted from #guint64 to #goffset before returning the result.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_SIZE.

val get_name : t -> string

Gets the name for a file. This is guaranteed to always be set.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_NAME.

Checks if a file is a symlink.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

val get_is_hidden : t -> bool

Checks if a file is hidden.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

val get_is_backup : t -> bool

Checks if a file is a backup file.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP.

val get_icon : t -> [ `icon ] Gobject.obj option

Gets the icon for a file.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_ICON.

val get_file_type : t -> Gio_enums.filetype

Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's content type, see g_file_info_get_content_type().

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_TYPE.

val get_etag : t -> string option

Gets the entity tag(iface.File.html#entity-tags) for a given #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_ETAG_VALUE.

val get_edit_name : t -> string

Gets the edit name for a file.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.

val get_display_name : t -> string

Gets a display name for a file. This is guaranteed to always be set.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

val get_content_type : t -> string option

Gets the file's content type.

It is an error to call this if the #GFileInfo does not contain %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

val get_attribute_uint64 : t -> string -> UInt64.t

Gets a unsigned 64-bit integer contained within the attribute. If the attribute does not contain an unsigned 64-bit integer, or is invalid, 0 will be returned.

val get_attribute_uint32 : t -> string -> UInt32.t

Gets an unsigned 32-bit integer contained within the attribute. If the attribute does not contain an unsigned 32-bit integer, or is invalid, 0 will be returned.

val get_attribute_type : t -> string -> Gio_enums.fileattributetype

Gets the attribute type for an attribute key.

val get_attribute_stringv : t -> string -> string array option

Gets the value of a stringv attribute. If the attribute does not contain a stringv, %NULL will be returned.

val get_attribute_string : t -> string -> string option

Gets the value of a string attribute. If the attribute does not contain a string, %NULL will be returned.

val get_attribute_status : t -> string -> Gio_enums.fileattributestatus

Gets the attribute status for an attribute key.

val get_attribute_object : t -> string -> [ `object_ ] Gobject.obj option

Gets the value of a #GObject attribute. If the attribute does not contain a #GObject, %NULL will be returned.

val get_attribute_int64 : t -> string -> int64

Gets a signed 64-bit integer contained within the attribute. If the attribute does not contain a signed 64-bit integer, or is invalid, 0 will be returned.

val get_attribute_int32 : t -> string -> Int32.t

Gets a signed 32-bit integer contained within the attribute. If the attribute does not contain a signed 32-bit integer, or is invalid, 0 will be returned.

val get_attribute_file_path : t -> string -> string option

Gets the value of a byte string attribute as a file path.

If the attribute does not contain a byte string, `NULL` will be returned.

This function is meant to be used by language bindings that have specific handling for Unix paths.

val get_attribute_byte_string : t -> string -> string option

Gets the value of a byte string attribute. If the attribute does not contain a byte string, %NULL will be returned.

val get_attribute_boolean : t -> string -> bool

Gets the value of a boolean attribute. If the attribute does not contain a boolean value, %FALSE will be returned.

val get_attribute_as_string : t -> string -> string option

Gets the value of an attribute, formatted as a string. This escapes things as needed to make the string valid UTF-8.

val dup : t -> t

Duplicates a file info structure.

val copy_into : t -> t -> unit

First clears all of the GFileAttributegio-GFileAttribute of @dest_info, and then copies all of the file attributes from @src_info to @dest_info.

val clear_status : t -> unit

Clears the status information from @info.