Top | ![]() |
![]() |
![]() |
![]() |
gboolean
fm_file_info_can_set_hidden (FmFileInfo *fi
);
Checks if file system supports "hidden" attribute change for fi
.
Returned value TRUE
is just a potential possibility, the attribute
still may be unable to change due to access reasons for example.
Since: 1.2.0
gboolean
fm_file_info_can_set_icon (FmFileInfo *fi
);
Checks if file system supports icon change for fi
. Returned value
TRUE
is just a potential possibility, icon still may be unable to
change due to access reasons for example.
Since: 1.2.0
gboolean
fm_file_info_can_set_name (FmFileInfo *fi
);
Checks if file system supports name change for fi
. Returned value
TRUE
is just a potential possibility, name still may be unable to
change due to access reasons for example.
Since: 1.2.0
const char *
fm_file_info_get_collate_key (FmFileInfo *fi
);
Get the collate key used for locale-dependent
filename sorting. The keys of different files
can be compared with strcmp()
directly.
This API is not thread-safe and should be used only in default context.
const char *
fm_file_info_get_collate_key_nocasefold
(FmFileInfo *fi
);
Get the collate key used for locale-dependent filename sorting but
in case-sensitive manner. The keys of different files can be compared
with strcmp()
directly. Returned data are owned by FmFileInfo and
should be not freed by caller.
This API is not thread-safe and should be used only in default context.
See also: fm_file_info_get_collate_key()
.
Since: 1.0.2
time_t
fm_file_info_get_ctime (FmFileInfo *fi
);
Retrieves time when access right were changed last time for file fi
.
Since: 1.2.0
const char *
fm_file_info_get_desc (FmFileInfo *fi
);
Get a human-readable description for the file.
This API is not thread-safe and should be used only in default context.
dev_t
fm_file_info_get_dev (FmFileInfo *fi
);
Get the filesystem device id (POSIX dev_t)
This is only applicable when the file is native.
e.g. fm_file_info_is_native()
returns TRUE.
const char *
fm_file_info_get_disp_group (FmFileInfo *fi
);
Retrieves human-readable string value for group of fi
. Returned value
is either group name or numeric string if grop has no entry in the
/etc/group file. Returned value is owned by fi
and should be not
altered by caller.
Since: 1.2.0
const char *
fm_file_info_get_disp_mtime (FmFileInfo *fi
);
Get a human-readable string for showing file modification time in the UI.
This API is not thread-safe and should be used only in default context.
const char *
fm_file_info_get_disp_name (FmFileInfo *fi
);
Get the display name used to show the file in the file manager UI. The display name is guaranteed to be UTF-8 and may be different from the real file name on the filesystem.
This API is not thread-safe and should be used only in default context.
const char *
fm_file_info_get_disp_owner (FmFileInfo *fi
);
Retrieves human-readable string value for owner of fi
. Returned value
is either owner login name or numeric string if owner has no entry in
/etc/passwd file. Returned value is owned by fi
and should be not
altered by caller.
Since: 1.2.0
const char *
fm_file_info_get_disp_size (FmFileInfo *fi
);
Get the size of the file as a human-readable string. It's convinient for show the file size to the user.
This API is not thread-safe and should be used only in default context.
const char *
fm_file_info_get_fs_id (FmFileInfo *fi
);
Get the filesystem id string
This is only applicable when the file is on a remote
filesystem. e.g. fm_file_info_is_native()
returns FALSE.
This API is not thread-safe and should be used only in default context.
FmIcon *
fm_file_info_get_icon (FmFileInfo *fi
);
Get the icon used to show the file in the file manager.
This API is not thread-safe and should be used only in default context.
FmMimeType *
fm_file_info_get_mime_type (FmFileInfo *fi
);
Get the mime-type of the file.
This API is not thread-safe and should be used only in default context.
a FmMimeType struct owned by FmFileInfo which
should not be freed.
If you need to keep it, use fm_mime_type_ref()
to obtain a
reference.
mode_t
fm_file_info_get_mode (FmFileInfo *fi
);
Get the mode of the file. For detail about the meaning of
mode, see manpage of stat()
and the st_mode struct field.
const char *
fm_file_info_get_name (FmFileInfo *fi
);
Get the base name of the file in filesystem encoding.
FmPath *
fm_file_info_get_path (FmFileInfo *fi
);
Get the path of the file
a FmPath struct. The returned FmPath struct is
owned by FmFileInfo and should not be freed.
If you need to keep it, use fm_path_ref()
to obtain a
reference.
const char *
fm_file_info_get_target (FmFileInfo *fi
);
Get the target of a symlink or a shortcut.
This API is not thread-safe and should be used only in default context.
gboolean
fm_file_info_is_accessible (FmFileInfo *fi
);
Checks if the user has read access to file or directory fi
.
Since: 1.0.1
gboolean
fm_file_info_is_backup (FmFileInfo *fi
);
Checks if file is backup. Native files are considered backup if they have ~ suffix.
Since: 1.2.0
gboolean
fm_file_info_is_mountable (FmFileInfo *fi
);
Checks if fi
is "inode/mount-point" type.
gboolean
fm_file_info_is_writable_directory (FmFileInfo *fi
);
Checks if directory fi
lies on writable file system. Returned value
TRUE
is just a potential possibility, it may still not allow write
due to access reasons for example.
Since: 1.2.0
gboolean
fm_file_info_list_is_same_fs (FmFileInfoList *list
);
Checks if all files in the list are on the same file system.
gboolean
fm_file_info_list_is_same_type (FmFileInfoList *list
);
Checks if all files in the list are of the same type.
FmFileInfo * fm_file_info_new ();
a new FmFileInfo struct which needs to be freed with
fm_file_info_unref()
when it's no more needed.
FmFileInfo * fm_file_info_new_from_g_file_data (GFile *gf
,GFileInfo *inf
,FmPath *path
);
Creates a new FmFileInfo for file pointed by path
and gf
based on
information stored in the inf
. Returned data should be freed with
fm_file_info_unref()
when no longer needed.
Since: 1.2.0
FmFileInfo * fm_file_info_new_from_gfileinfo (FmPath *path
,GFileInfo *inf
);
fm_file_info_new_from_gfileinfo
has been deprecated since version 1.2.0 and should not be used in newly-written code.
Use fm_file_info_new_from_g_file_data()
instead.
Create a new FmFileInfo for file pointed by path
based on
information stored in the GFileInfo object.
A new FmFileInfo struct which should be freed with
fm_file_info_unref()
when no longer needed.
FmFileInfo * fm_file_info_new_from_menu_cache_item (FmPath *path
,struct _MenuCacheItem *item
);
Creates a new FmFileInfo for a file by path
and fills it with info
from a menu cache item
. Returned data should be freed with
fm_file_info_unref()
when no longer needed.
Since: 0.1.1
FmFileInfo * fm_file_info_new_from_native_file (FmPath *path
,const char *path_str
,GError **err
);
Create a new FmFileInfo for file pointed by path
. Returned data
should be freed with fm_file_info_unref()
after usage.
path |
path descriptor. |
[allow-none] |
path_str |
full path to the file |
|
err |
pointer to receive error. |
[allow-none][out] |
Since: 1.2.0
FmFileInfo *
fm_file_info_ref (FmFileInfo *fi
);
Increase reference count of the FmFileInfo struct.
void fm_file_info_set_disp_name (FmFileInfo *fi
,const char *name
);
Set the display name used to show the file in the
file manager UI. If NULL is passed for name
,
the original display will be freed and the real base name
will be used for display.
void fm_file_info_set_from_g_file_data (FmFileInfo *fi
,GFile *gf
,GFileInfo *inf
);
Get file info from the GFile and GFileInfo objects and sets data in the FmFileInfo struct appropriately.
fi |
a FmFileInfo struct to update |
|
gf |
a GFile object to inspect. |
[allow-none] |
inf |
a GFileInfo object to inspect |
Since: 1.2.0
void fm_file_info_set_from_gfileinfo (FmFileInfo *fi
,GFileInfo *inf
);
fm_file_info_set_from_gfileinfo
has been deprecated since version 1.2.0 and should not be used in newly-written code.
Use fm_file_info_set_from_g_file_data()
instead.
Get file info from the GFileInfo object and store it in the FmFileInfo struct.
void fm_file_info_set_from_menu_cache_item (FmFileInfo *fi
,struct _MenuCacheItem *item
);
fm_file_info_set_from_menu_cache_item
has been deprecated since version 1.2.0 and should not be used in newly-written code.
gboolean fm_file_info_set_from_native_file (FmFileInfo *fi
,const char *path
,GError **err
);
Get file info of the specified native file and store it in the FmFileInfo struct.
Prior to calling this function, the FmPath of FmFileInfo should
have been set with fm_file_info_set_path()
.
Note that this call does I/O and therefore can block.
void fm_file_info_set_icon (FmFileInfo *fi
,GIcon *icon
);
Updates the icon used to show the file in the file manager UI.
Since: 1.2.0
void fm_file_info_set_path (FmFileInfo *fi
,FmPath *path
);
This API is not thread-safe and should be used only in default context.
Change the path of the FmFileInfo.
void
fm_file_info_unref (FmFileInfo *fi
);
Decrease reference count of the FmFileInfo struct. When the last reference to the struct is released, the FmFileInfo struct is freed.
void fm_file_info_update (FmFileInfo *fi
,FmFileInfo *src
);
This API is not thread-safe and should be used only in default context.
Update the content of fi
by copying file info
stored in src
to fi
.