PROPOSAL: libmetastatfs 0.0.1
nf2 at scheinwelt.at
Sun Jul 29 06:37:39 PDT 2007
Particularly with the growing popularity of FUSE, i believe an interface
to query meta-information from mounts would be quite useful. The
interface could return information such as:
* File-system capabilities (network file-systems can't always be mapped
into the POSIX layer perfectly)
* Hints for desktop file-management, set as mount options (should .Trash
be created or not; is it fast enough to do preview rendering; should
backup-files be created locally rather than on the remote fs). Only the
one who mounts, knows if he connects to the file-server in the next
room, or to a remote and slow web-space.
* Status of the filesystem (internal connection status, idle, busy,
* Identify who's managing the mountpoint... (HAL, fuse,...)
One possibility to reveal such information would be xattrs in the root
of the filesystem (the mountpoint). But there might be other ways: A
hidden file in the mountpoint, spec files under /etc (for FUSE mounts in
$HOME), ioctls, dbus...
"libmetastatfs" works like the statvfs function: You just throw a path
in and it will return the information about the filesystem the path
resides on. That way, the actual technique to query the attributes can
be hidden. The format of the meta-information is key/value pairs, with
string-keys and the values can be integers, booleans and strings...
Here is a prototype of the library... metastatfs.h also has some
#define's for standard attributes...
I wonder if there should be a kind of "offline" labeling of mount-points
too (leaving a .mountpoint file to prevent file-managers from dropping
stuff in; to display mount-point icons,...). Or having mount spec files
- that's what i tried in libfusi.
More information about the xdg