Ejemplo n.º 1
0
 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);
     });
 }
Ejemplo n.º 2
0
        public GUdev.Device GudevDeviceFromGioMount(GLib.Mount mount)
        {
            if (mount == null)
            {
                return(null);
            }

            return(GudevDeviceFromGioVolume(mount.Volume));
        }
Ejemplo n.º 3
0
        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");
        }
Ejemplo n.º 4
0
 public static bool UnmountWithOperationFinish(this GLib.Mount m, AsyncResult result)
 {
     return(NativeInterop.UnmountWithOperation(m, result));
 }