Nautilus.FileInfo: nautilus-python Reference Manual

## Nautilus.FileInfo Nautilus.FileInfo — Nautilus.FileInfo Reference |

## Synopsis

     Nautilus.FileInfo extends, gobject.GInterface {
      is_gone();
      get_file_type();
      get_location();
      get_name();
      get_uri();
      get_activation_uri();
      get_parent_info();
      get_parent_location();
      get_parent_uri();
      get_mount();
      get_uri_scheme();
      get_mime_type();
      is_mime_type(mime_type);
      is_directory();
      can_write();
      add_emblem(emblem_name);
      get_string_attribute(attribute_name);
      add_string_attribute(attribute_name,
                           value);
      invalidate_extension_info();
    }

## Ancestry

    +-- gobject.GInterface
        +-- Nautilus.FileInfo

## Description

`Nautilus.FileInfo` objects are passed to extensions by the `Nautilus.InfoProvider`.

## Public Methods

### Nautilus.FileInfo.is_gone

    is_gone();

Returns : | whether the file still exists

### Nautilus.FileInfo.get_file_type

    get_file_type();

Returns : | the `gio.FileType` associated with the file

### Nautilus.FileInfo.get_location

    get_location();

Returns : | the `gio.File` associated with the file

### Nautilus.FileInfo.get_name

    get_name();

Returns : | the basename of the file

### Nautilus.FileInfo.get_uri

    get_uri();

Returns : | the uri of the file

### Nautilus.FileInfo.get_activation_uri

    get_activation_uri();

Returns : | the activation uri of the file

### Nautilus.FileInfo.get_parent_info

    get_parent_info();

Returns : | the `Nautilus.FileInfo` object associated with the file's parent

### Nautilus.FileInfo.get_parent_location

    get_parent_location();

Returns : | the `gio.File` associated with the file's parent location

### Nautilus.FileInfo.get_parent_uri

    get_parent_uri();

Returns : | the uri of the file's parent

### Nautilus.FileInfo.get_mount

    get_mount();

Returns : | the `gio.GMount` associated with the file, if it exists

### Nautilus.FileInfo.get_uri_scheme

    get_uri_scheme();

Returns : | the uri scheme of the file

### Nautilus.FileInfo.get_mime_type

    get_mime_type();

Returns : | the mimetype of the file

### Nautilus.FileInfo.is_mime_type

    is_mime_type(mimetype);

`mimetype` : | a mimetype string (i.e. "text/plain")
Returns : | whether the file's mimetype string matches the provided mimetype string

### Nautilus.FileInfo.is_directory

    is_directory();

Returns : | whether the item is a directory

### Nautilus.FileInfo.can_write

    can_write();

Returns : | whether the file is writeable

### Nautilus.FileInfo.add_emblem

    add_emblem(emblem_name);

`emblem_name` : | the name of an emblem to add

### Nautilus.FileInfo.get_string_attribute

    get_string_attribute(attribute_name);

`attribute_name` : | a string attribute name
Returns : | the value associated with the file attribute

### Nautilus.FileInfo.add_string_attribute

    add_string_attribute(attribute_name,
                         value);

`attribute_name` : | a string attribute name
`value` : | an attribute value

### Nautilus.FileInfo.invalidate_extension_info

    invalidate_extension_info();

Invalidates the information Nautilus has about this file, which causes it to request new information from its `Nautilus.InfoProvider` providers.