Top |
#define | THUNAR_METADATA_STRING_DELIMETER |
enum | ThunarGType |
#define | THUNAR_TYPE_G_FILE_HASH_TABLE |
#define | thunar_g_list_copy_deep |
#define | thunar_g_list_free_full |
GFile *
thunar_g_file_resolve_symlink (GFile *file
);
Returns the resolved symlink target of file
as a new GFile.
If file
is not a symlink, file
will just be returned
GKeyFile * thunar_g_file_query_key_file (GFile *file
,GCancellable *cancellable
,GError **error
);
gboolean thunar_g_file_write_key_file (GFile *file
,GKeyFile *key_file
,GCancellable *cancellable
,GError **error
);
const gchar *
thunar_g_file_guess_device_type (GFile *file
);
Returns : (transfer none) (nullable): the string of the device type.
gchar *
thunar_g_file_get_display_name_remote (GFile *file
);
gboolean
thunar_g_vfs_is_uri_scheme_supported (const gchar *scheme
);
gboolean thunar_g_file_get_free_space (GFile *file
,guint64 *fs_free_return
,guint64 *fs_size_return
);
Determines the amount of free space of the volume on
which file
resides. Returns TRUE
if the amount of
free space was determined successfully and placed into
free_space_return
, else FALSE
will be returned.
gchar * thunar_g_file_get_free_space_string (GFile *file
,gboolean file_size_binary
);
gboolean thunar_g_file_copy (GFile *source
,GFile *destination
,GFileCopyFlags flags
,gboolean use_partial
,GCancellable *cancellable
,GFileProgressCallback progress_callback
,gpointer progress_callback_data
,GError **error
);
Calls g_file_copy()
if use_partial
is not enabled.
If enabled, copies files to *.partial~ first and then
renames *.partial~ into its original name.
source |
input GFile |
|
destination |
destination GFile |
|
flags |
set of GFileCopyFlags |
|
use_partial |
option to use *.partial~ |
|
cancellable |
optional GCancellable object. |
[nullable] |
progress_callback |
function to callback with progress information. |
[nullable][scope call] |
progress_callback_data |
user data to pass to |
[clousure] |
error |
GError to set on error. |
[nullable] |
gboolean thunar_g_file_compare_contents (GFile *file_a
,GFile *file_b
,GCancellable *cancellable
,GError **error
);
Compares the contents of file_a
and file_b
.
GList *
thunar_g_file_list_new_from_string (const gchar *string
);
Splits an URI list conforming to the text/uri-list mime type defined in RFC 2483 into individual URIs, discarding any comments and whitespace. The resulting list will hold one GFile for each URI.
If string
contains no URIs, this function
will return NULL
.
gchar **
thunar_g_file_list_to_stringv (GList *list
);
Free the returned value using g_strfreev()
when you
are done with it. Useful for gtk_selection_data_set_uris.
GList *
thunar_g_file_list_get_parents (GList *list
);
Collects all parent folders of the passed files
If multiple files share the same parent, the parent will only be added once to the returned list.
Each list element of the returned list needs to be freed with g_object_unref()
after use.
gboolean thunar_g_file_is_descendant (GFile *descendant
,GFile *ancestor
);
Check if descendant
is a subdirectory of ancestor
.
descendant
== ancestor
also counts.
#define thunar_g_list_append_deep(list, object) g_list_append (list, g_object_ref (G_OBJECT (object)))
#define thunar_g_list_prepend_deep(list, object) g_list_prepend (list, g_object_ref (G_OBJECT (object)))
gboolean thunar_g_app_info_launch (GAppInfo *info
,GFile *working_directory
,GList *path_list
,GAppLaunchContext *context
,GError **error
);
gboolean
thunar_g_file_is_on_local_device (GFile *file
);
Tries to find if the file
is on a local device or not.
Local device if (all conditions should match):
the file has a 'file' uri scheme.
the file is located on devices not handled by the GVolumeMonitor (GVFS).
the device is handled by GVolumeMonitor (GVFS) and cannot be unmounted (USB key/disk, fuse mounts, Samba shares, PTP devices).
The target file
may not exist yet when this function is used, so recurse
the parent directory, possibly reaching the root mountpoint.
This should be enough to determine if a file
is on a local device or not.
gboolean thunar_g_file_set_executable_flags (GFile *file
,GError **error
);
Tries to set +x flag of the file for user, group and others
gboolean
thunar_g_file_is_in_xdg_data_dir (GFile *file
);
Returns TRUE
if file
is located below one of the directories given in XDG_DATA_DIRS
gboolean
thunar_g_file_is_desktop_file (GFile *file
);
Returns TRUE
if file
is a .desktop file.
char * thunar_g_file_get_link_path_for_symlink (GFile *file_to_link
,GFile *symlink
);
Method to build the link target path in order to link from symlink
to file_to_link
.
The caller is responsible for freeing the string using g_free()
when done.
void thunar_g_file_set_metadata_setting (GFile *file
,GFileInfo *info
,ThunarGType type
,const gchar *setting_name
,const gchar *setting_value
,gboolean async
);
Sets the setting setting_name
of file
to setting_value
and stores it in
the file
s metadata.
file |
a GFile instance. |
|
info |
Additional GFileInfo instance to update |
|
type |
ThunarGType of the metadata |
|
setting_name |
the name of the setting to set |
|
setting_value |
the value to set |
|
async |
whether g_file_set_attributes_async or g_file_set_attributes_from_info should be used |
void thunar_g_file_clear_metadata_setting (GFile *file
,GFileInfo *info
,const gchar *setting_name
);
gchar * thunar_g_file_get_metadata_setting (GFile *file
,GFileInfo *info
,ThunarGType type
,const gchar *setting_name
);