public static void EjectWithOperation(this GLib.Mount m, MountUnmountFlags flags, GLib.MountOperation operation, Cancellable cancellable, AsyncReadyCallback callback) { m.MaybeEmptyTrashWithAction(() => { NativeInterop.EjectWithOperation(m, flags, operation, cancellable, callback); }); }
public GUdev.Device GudevDeviceFromGioMount(GLib.Mount mount) { if (mount == null) { return(null); } return(GudevDeviceFromGioVolume(mount.Volume)); }
private static void FillDriveInfoFromMount(DriveInfo d, GLib.Mount m, string device) { if (m.Volume != null) { // Only get size and format info from physical volumes // (System.IO.DriveInfo throws an exception on network mounts) System.IO.DriveInfo di = new System.IO.DriveInfo(m.Root.Path); d.totalSize = di.TotalSize; d.filesystem = di.DriveFormat; } d.volumeLabel = m.Name; d.rootPath = m.Root.Path; d.device = device; d.driveType = GuessDriveType(m.Root.UriScheme, m.Icon, m.Drive); d.isMounted = true; d.isReady = true; d.hasAudioCdVolume = (m.Root.UriScheme == "cdda"); }
public static bool UnmountWithOperationFinish(this GLib.Mount m, AsyncResult result) { return(NativeInterop.UnmountWithOperation(m, result)); }