Hi all:
I need to know if, given two paths to local files, they are in the same partition/physical disk or not (to implement “move between the same disk/copy from one disk to another”). Does GLib/Gio have a way for doing this?
Thanks.
Hi all:
I need to know if, given two paths to local files, they are in the same partition/physical disk or not (to implement “move between the same disk/copy from one disk to another”). Does GLib/Gio have a way for doing this?
Thanks.
See the documentation for G_FILE_ATTRIBUTE_ID_FILESYSTEM
.
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem" /* string */
A key in the “id” namespace for getting the file system identifier. Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
Thanks! In fact, it is precisely to implement Drag’n’Drop.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.