Nautilus.FileInfo
Description: Reference for Nautilus.FileInfo

### Interface

# NautilusFileInfo

#### Description [src]

    interface Nautilus.FileInfo : GObject.Object

File interface for nautilus extensions.

`NautilusFileInfo` provides methods to get and modify information about file objects in the file manager.

#### Prerequisite

In order to implement FileInfo, your type must inherit from`GObject`.

#### Functions

###### nautilus_file_info_create

Get an existing `NautilusFileInfo` (if it exists) or create a new one is it does not exist.

###### nautilus_file_info_create_for_uri

Get an existing `NautilusFileInfo` (if it exists) or create a new one is it does not exist.

###### nautilus_file_info_list_copy

Deep copy a list of `NautilusFileInfo`.

###### nautilus_file_info_list_free

Deep free a list of `NautilusFileInfo`.

###### nautilus_file_info_lookup

Get an existing `NautilusFileInfo` or `NULL` if it does not exist in the application cache.

###### nautilus_file_info_lookup_for_uri

Get an existing `NautilusFileInfo` or `NULL` if it does not exist in the application cache.

#### Instance methods

###### nautilus_file_info_add_emblem

Add an emblem.

###### nautilus_file_info_add_string_attribute

Set’s the attributes value or replacing the existing value (if one exists).

###### nautilus_file_info_can_write

Gets whether the `NautilusFileInfo` is writeable.

###### nautilus_file_info_get_activation_uri

Gets the activation uri.

###### nautilus_file_info_get_file_type

Get the cached `GFileType`.

###### nautilus_file_info_get_location

Get the corresponding `GFile`.

###### nautilus_file_info_get_mime_type

Get the cached mime_type.

###### nautilus_file_info_get_mount

Gets the cached mount.

###### nautilus_file_info_get_name

Gets the name.

###### nautilus_file_info_get_parent_info

Get the parent `NautilusFileInfo`.

###### nautilus_file_info_get_parent_location

Gets the parent location.

###### nautilus_file_info_get_parent_uri

Get the parent `NautilusFileInfo` uri.

###### nautilus_file_info_get_string_attribute

Get the attribute’s value.

###### nautilus_file_info_get_uri

Gets the URI.

###### nautilus_file_info_get_uri_scheme

Get the uri scheme.

###### nautilus_file_info_invalidate_extension_info

Invalidate the current extension information.

###### nautilus_file_info_is_directory

Gets whether the `NautilusFileInfo` is a directory.

###### nautilus_file_info_is_gone

Get whether a `NautilusFileInfo` is gone.

###### nautilus_file_info_is_mime_type

Gets whether the mime_type of the `NautilusFileInfo` matches the given type.

#### Interface structure

    struct NautilusFileInfoInterface {
      GTypeInterface g_iface;
      gboolean (* is_gone) (
        NautilusFileInfo* file_info
      );
      char* (* get_name) (
        NautilusFileInfo* file_info
      );
      char* (* get_uri) (
        NautilusFileInfo* file_info
      );
      char* (* get_parent_uri) (
        NautilusFileInfo* file_info
      );
      char* (* get_uri_scheme) (
        NautilusFileInfo* file_info
      );
      char* (* get_mime_type) (
        NautilusFileInfo* file_info
      );
      gboolean (* is_mime_type) (
        NautilusFileInfo* file_info,
        const char* mime_type
      );
      gboolean (* is_directory) (
        NautilusFileInfo* file_info
      );
      void (* add_emblem) (
        NautilusFileInfo* file_info,
        const char* emblem_name
      );
      char* (* get_string_attribute) (
        NautilusFileInfo* file_info,
        const char* attribute_name
      );
      void (* add_string_attribute) (
        NautilusFileInfo* file_info,
        const char* attribute_name,
        const char* value
      );
      void (* invalidate_extension_info) (
        NautilusFileInfo* file_info
      );
      char* (* get_activation_uri) (
        NautilusFileInfo* file_info
      );
      GFileType (* get_file_type) (
        NautilusFileInfo* file_info
      );
      GFile* (* get_location) (
        NautilusFileInfo* file_info
      );
      GFile* (* get_parent_location) (
        NautilusFileInfo* file_info
      );
      NautilusFileInfo* (* get_parent_info) (
        NautilusFileInfo* file_info
      );
      GMount* (* get_mount) (
        NautilusFileInfo* file_info
      );
      gboolean (* can_write) (
        NautilusFileInfo* file_info
      );

    }

No description available.

###### Interface members

`g_iface` |
    GTypeInterface
| No description available.
`is_gone` |
    gboolean (* is_gone) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_name` |
    char* (* get_name) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_uri` |
    char* (* get_uri) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_parent_uri` |
    char* (* get_parent_uri) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_uri_scheme` |
    char* (* get_uri_scheme) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_mime_type` |
    char* (* get_mime_type) (
        NautilusFileInfo* file_info
      )
| No description available.
`is_mime_type` |
    gboolean (* is_mime_type) (
        NautilusFileInfo* file_info,
        const char* mime_type
      )
| No description available.
`is_directory` |
    gboolean (* is_directory) (
        NautilusFileInfo* file_info
      )
| No description available.
`add_emblem` |
    void (* add_emblem) (
        NautilusFileInfo* file_info,
        const char* emblem_name
      )
| No description available.
`get_string_attribute` |
    char* (* get_string_attribute) (
        NautilusFileInfo* file_info,
        const char* attribute_name
      )
| No description available.
`add_string_attribute` |
    void (* add_string_attribute) (
        NautilusFileInfo* file_info,
        const char* attribute_name,
        const char* value
      )
| No description available.
`invalidate_extension_info` |
    void (* invalidate_extension_info) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_activation_uri` |
    char* (* get_activation_uri) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_file_type` |
    GFileType (* get_file_type) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_location` |
    GFile* (* get_location) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_parent_location` |
    GFile* (* get_parent_location) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_parent_info` |
    NautilusFileInfo* (* get_parent_info) (
        NautilusFileInfo* file_info
      )
| No description available.
`get_mount` |
    GMount* (* get_mount) (
        NautilusFileInfo* file_info
      )
| No description available.
`can_write` |
    gboolean (* can_write) (
        NautilusFileInfo* file_info
      )
| No description available.

#### Virtual methods

###### Nautilus.FileInfo.add_emblem

Add an emblem.

###### Nautilus.FileInfo.add_string_attribute

Set’s the attributes value or replacing the existing value (if one exists).

###### Nautilus.FileInfo.can_write

Gets whether the `NautilusFileInfo` is writeable.

###### Nautilus.FileInfo.get_activation_uri

Gets the activation uri.

###### Nautilus.FileInfo.get_file_type

Get the cached `GFileType`.

###### Nautilus.FileInfo.get_location

Get the corresponding `GFile`.

###### Nautilus.FileInfo.get_mime_type

Get the cached mime_type.

###### Nautilus.FileInfo.get_mount

Gets the cached mount.

###### Nautilus.FileInfo.get_name

Gets the name.

###### Nautilus.FileInfo.get_parent_info

Get the parent `NautilusFileInfo`.

###### Nautilus.FileInfo.get_parent_location

Gets the parent location.

###### Nautilus.FileInfo.get_parent_uri

Get the parent `NautilusFileInfo` uri.

###### Nautilus.FileInfo.get_string_attribute

Get the attribute’s value.

###### Nautilus.FileInfo.get_uri

Gets the URI.

###### Nautilus.FileInfo.get_uri_scheme

Get the uri scheme.

###### Nautilus.FileInfo.invalidate_extension_info

Invalidate the current extension information.

###### Nautilus.FileInfo.is_directory

Gets whether the `NautilusFileInfo` is a directory.

###### Nautilus.FileInfo.is_gone

Get whether a `NautilusFileInfo` is gone.

###### Nautilus.FileInfo.is_mime_type

Gets whether the mime_type of the `NautilusFileInfo` matches the given type.