Re: Fwd: check if current process has R/W access to a file.
- From: "Nils O." Selåsdal <noselasd frisurf no>
- To: mhbouhmadi free fr
- Cc: gnome-vfs-list gnome org
- Subject: Re: Fwd: check if current process has R/W access to a file.
- Date: Mon, 28 Jun 2004 15:04:52 +0200
On Sat, 2004-06-26 at 19:27, mhbouhmadi free fr wrote:
> Hi,
> I am looking for a function that determine the accessibility of a file like the
> unix standard "int access(char* _path, int _mode)" function.
>
> I've searched the GnomeVFS API without luck.
> the GnomeVFSFileInfo has enough information about permissions and owners that it
> *seems* to me that a function like
> "bool gnome_vfs_has_access(GnomeVFSFileInfo, AccessKind)"
> should not be difficult to write (and very usefull).
>
> Does such a function exist in Gnome VFS?
Use gnome_vfs_get_file_info(..)
to get a GnomeVFSFileInfo structure , check its
permissions member.
(and its valid_fields member as well, to test that the permission
member is valid)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]