Discovering if a file is read-only
- From: Murray Cumming <murrayc murrayc com>
- To: gnome-vfs-list <gnome-vfs-list gnome org>
- Subject: Discovering if a file is read-only
- Date: Tue, 08 Jun 2004 23:54:29 +0200
I am examining GnomeVfsFileInfo::permissions on a GnomeVfsFileInfo that
I got from gnome_vfs_get_file_info_from_handle() after opening the
GnomeVfsUriHandle with gnome_vfs_open(), with the GNOME_VFS_OPEN_READ
option.
When I use it on a local file that is not writable by the group, user,
or others, it does not seem to set the GNOME_VFS_PERM_ACCESS_WRITABLE
flag.
So, should I be able to use GNOME_VFS_PERM_ACCESS_WRITABLE to check
whether the file is writable by the current user? Or do I need to use
GNOME_VFS_PERM_USER_WRITE, GNOME_VFS_PERM_GROUP_WRITE,
GNOME_VFS_PERM_OTHERS_WRITE and check whether the user is in the correct
group?
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]