Top |
org.freedesktop.UDisks2.Filesystemorg.freedesktop.UDisks2.Filesystem — Block device containing a mountable filesystem |
SetLabel (IN s label, IN a{sv} options); Mount (IN a{sv} options, OUT s mount_path); Unmount (IN a{sv} options); Resize (IN t size, IN a{sv} options); Check (IN a{sv} options, OUT b consistent); Repair (IN a{sv} options, OUT b repaired); TakeOwnership (IN a{sv} options);
This interface is used for org.freedesktop.UDisks2.Block devices that contain a mountable filesystem.
SetLabel (IN s label, IN a{sv} options);
Sets the filesystem label.
|
The label to set. |
|
Options (currently unused except for standard options). |
Mount (IN a{sv} options, OUT s mount_path);
Mounts the filesystem.
The directory the filesystem will be mounted in is determined
by looking at data related to the device or filesystem (such
the filesystem UUID and label) and will be created
automatically except if the device the filesystem resides on
is referenced in the /etc/fstab
file, see
below. In either case, the directory the filesystem is mounted
in, is returned in mount_path
on success - it is usually a
sub-directory of /run/media/$USER
but note that
any directory may be returned.
The filesystem type to use can be overridden with the fstype
option and mount options (a comma-separated string) can be
given in options
option. Note that both the mount options and
filesystem types are validated against a (small) whitelist to
avoid unexpected privilege escalation
If the device in question is referenced in the
/etc/fstab
file, the
mount command is called directly (as root)
and the given options or filesystem type given in options
are
ignored.
If x-udisks-auth
is specified as an option
for the device in the /etc/fstab
file,
then the mount command is run as the
calling user, without performing any authorization check
mentioned above. If this fails because of insufficient
permissions, an authorization check is performed (which
typically results in the user having to authenticate as an
administrator). If authorized, the mount
command is then run as root.
The filesystem should be unmounted using the Unmount() method.
If the device is removed without being unmounted (e.g. the user yanking the device or pulling the media out) or unmounted in a way that bypasses the Unmount() method (e.g. unmounted by the super-user by using the umount(8) command directly), the device will be unmounted (if needed) and/or the mount point will be cleaned up.
|
Options - known options (in addition to standard options) includes |
|
The filesystem path where the device was mounted. |
Unmount (IN a{sv} options);
Unmount a mounted device.
If the device in question was mounted by the calling user via the Mount() method the filesystem is unmounted without any authorization checks. Otherwise, an authorization check is performed (which typically results in the user having to authenticate as an administrator). If authorized, the filesystem is unmounted.
If the mountpoint was previously created by udisks it is guaranteed it will be removed upon returning from this method call.
If the filesystem is busy, this operation fails with the error
org.freedesktop.UDisks2.Error.DeviceBusy
unless the force
option is used.
|
Options - known options (in addition to standard options) includes |
Resize (IN t size, IN a{sv} options);
Resizes the filesystem.
Shrinking operations need to move data which causes this action to be slow. The filesystem-resize job for the object might expose progress.
|
The target size in bytes, 0 for maximum. |
|
Options (currently unused except for standard options). |
Since 2.7.2
Check (IN a{sv} options, OUT b consistent);
Checks the filesystem for consistency.
Unsupported filesystems result in an error.
|
Options (currently unused except for standard options). |
|
Whether the filesystem is undamaged. |
Since 2.7.2
Repair (IN a{sv} options, OUT b repaired);
Tries to repair the filesystem.
Unsupported filesystems result in an error.
|
Options (currently unused except for standard options). |
|
Whether the filesystem could be successfully repaired. |
Since 2.7.2
TakeOwnership (IN a{sv} options);
Changes ownership of the filesystem to the UID and GID of the calling user.
Filesystems that don't support ownership result in an error.
|
Options (in addition to standard options) includes |
Since 2.7.2