![]() |
![]() |
![]() |
![]() |
Thunarx.FileInfoThunarx.FileInfo — Thunarx.FileInfo Reference |
Thunarx.FileInfo extends, GObject.GInterface {get_name();
get_uri();
get_parent_uri();
get_uri_scheme();
get_mime_type();
has_mime_type(mime_type);
is_directory();
get_file_info();
get_filesystem_info();
get_location();
changed();
renamed();
}
get_name();
Returns : |
Returns the real name of the file represented by file_info in the local file system encoding. |
get_uri();
Returns : |
Returns the escaped, fully qualified URI of the file object represented by file_info. |
get_parent_uri();
Returns : |
Returns the URI to the parent file of file_info or NULL if file_info has no parent. Note that the parent URI may be of a different type than the URI of file_info. For example, the parent of "file:///" is "computer:///". |
get_uri_scheme();
Returns : |
Returns the URI scheme of the file represented by file_info. E.g. if file_info refers to the file "file:///usr/home", the return value will be "file". |
get_mime_type();
Returns : |
Returns the MIME-type of the file represented by file_info or NULL if no MIME-type is known for file_info. |
has_mime_type();
|
the mime_type to check for |
Returns : |
Checks whether file_info is of the given mime_type or whether the MIME-type of file_info is a subclass of mime_type. This is the preferred way for most extensions to check whether they support a given file or not, and you should consider using this method rather than Thunarx.FileInfo.get_mime_type(). A simple example would be a menu extension that performs a certain action on text files. In this case you want to check whether a given Thunarx.FileInfo refers to any kind of text file, not only to "text/plain" (e.g. this also includes "text/xml" and "application/x-desktop"). But you should be aware that this method may take some time to test whether mime_type is valid for file_info, so don't call it too often. |
is_directory();
Returns : |
Checks whether file_info refers to a directory. |
get_file_info();
Returns : |
Returns the GFileInfo object associated with file_info, which includes additional information about the file_info as queried from GIO earlier. |
get_filesystem_info();
Returns : |
Returns the GFileInfo which includes additional information about the filesystem file_info resides on. |
get_location();
Returns : |
Returns the GFile file_info points to. The GFile is a more powerful tool than just the URI or the path. |
changed();
Returns : |
Emits the ::changed signal on file_info. This method should not be invoked by Thunar plugins, instead the file manager itself will use this method to emit ::changed whenever it notices a change on file_info. |
renamed();
Returns : |
Emits the ::renamed signal on file_info. This method should not be invoked by Thunar plugins, instead the file manager will emit this signal whenever the user renamed the file_info. The plugins should instead connect to the ::renamed signal and update it's internal state and it's user interface after the file manager renamed a file. |
Emitted whenever the system notices a change to file_info.
Thunar plugins should use this signal to stay informed about changes to a file_info for which they currently display information (i.e. in a Thunarx.PropertyPage), and update it's user interface whenever a change is noticed on file_info.