Migrate away from GnomeVFSFilePermissions

Hi,

I’m currently trying to migrate away from the deprecated Gnome-VFS to GIO. But I am stuck on how to retrieve file access permissions from within GIO. In gnome-vfs this was done using GnomeVFSFilePermissions which is a member of a GnomeVFSFileInfo object instance for a given file.

But as far as I can see, in the successor GFileInfo, it is only possible to retrieve the access information of the current user to a given file within the “access::*” namespace. For example, there exists only G_FILE_ATTRIBUTE_ACCESS_CAN_READ with informs about if “if the user is able to read the file”.

My question is: Within GIO, how can I retrieve the file access attributes for a file for a general user, a group and anyone else? (The information which is shown when doing “ls -l $File” in the command line.)

Thank you for helpful hints on this
Uwe

G_FILE_ATTRIBUTE_UNIX_MODE would give you that or not?

:man_facepalming: I did not notice that one. Will give it a try. Thanks for pointing me on that. :+1:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.