![]() |
![]() |
![]() |
Thunar-VFS Reference Manual | ![]() |
---|
ThunarVfsInfoThunarVfsInfo — |
#include <thunar-vfs/thunar-vfs.h> ThunarVfsInfo* thunar_vfs_info_new_for_path (ThunarVfsPath *path, GError **error); ThunarVfsInfo* thunar_vfs_info_ref (ThunarVfsInfo *info); void thunar_vfs_info_unref (ThunarVfsInfo *info); gboolean thunar_vfs_info_execute (const ThunarVfsInfo *info, GdkScreen *screen, GList *path_list, GError **error); gboolean thunar_vfs_info_rename (ThunarVfsInfo *info, const gchar *name, GError **error); gboolean thunar_vfs_info_matches (const ThunarVfsInfo *a, const ThunarVfsInfo *b); void thunar_vfs_info_list_free (GList *info_list);
ThunarVfsInfo* thunar_vfs_info_new_for_path (ThunarVfsPath *path, GError **error);
Queries the ThunarVfsInfo for the given path
. Returns the
ThunarVfsInfo if the operation is successfull, else NULL
.
In the latter case, error
will be set to point to a GError
describing the cause of the failure.
path : |
the ThunarVfsPath of the file whose info should be queried. |
error : |
return location for errors or NULL .
|
Returns : | the ThunarVfsInfo for path or NULL .
|
ThunarVfsInfo* thunar_vfs_info_ref (ThunarVfsInfo *info);
Increments the reference count on info
by 1 and
returns a pointer to info
.
info : |
a ThunarVfsInfo. |
Returns : | a pointer to info .
|
void thunar_vfs_info_unref (ThunarVfsInfo *info);
Decrements the reference count on info
by 1 and if
the reference count drops to zero as a result of this
operation, the info
will be freed completely.
info : |
a ThunarVfsInfo. |
gboolean thunar_vfs_info_execute (const ThunarVfsInfo *info, GdkScreen *screen, GList *path_list, GError **error);
Executes the file referred to by info
, given path_list
as parameters,
on the specified screen
. info
may refer to either a regular,
executable file, or a .desktop
file, whose
type is Application
.
info : |
a ThunarVfsInfo. |
screen : |
a GdkScreen or NULL to use the default GdkScreen.
|
path_list : |
the list of ThunarVfsPaths to give as parameters
to the file referred to by info on execution.
|
error : |
return location for errors or NULL .
|
Returns : | TRUE on success, else FALSE .
|
gboolean thunar_vfs_info_rename (ThunarVfsInfo *info, const gchar *name, GError **error);
Tries to rename the file referred to by info
to the
new name
.
The rename operation is smart in that it checks the
type of info
first, and if info
refers to a
.desktop
file, the file name
won't be touched, but instead the Name
field of the .desktop
will be
changed to name
. Else, if info
refers to a regular
file or directory, the file will be given a new
name.
info : |
a ThunarVfsInfo. |
name : |
the new file name in UTF-8 encoding. |
error : |
return location for errors or NULL .
|
Returns : | TRUE on success, else FALSE .
|
gboolean thunar_vfs_info_matches (const ThunarVfsInfo *a, const ThunarVfsInfo *b);
Checks whether a
and b
refer to the same file
and share the same properties.
a : |
a ThunarVfsInfo. |
b : |
a ThunarVfsInfo. |
Returns : | TRUE if a and b match.
|
void thunar_vfs_info_list_free (GList *info_list);
Unrefs all ThunarVfsInfos in info_list
and
frees the list itself.
This method always returns NULL
for the convenience of
being able to do:
info_list = thunar_vfs_info_list_free (info_list);
info_list : |
a list ThunarVfsInfos. |
<< ThunarVfsPath | Utility Functions >> |