/// <summary> /// Mounts the specified device. /// </summary> /// <param name="mountPoint">The mp.</param> /// <param name="options">The options.</param> public void Mount(MountPoint mountPoint, String options) { mountPoint.ThrowIfNull("mountPoint"); Device.ThrowIfNull("Device"); CommandErrorReceiver cer = new CommandErrorReceiver(); Device.ExecuteShellCommand("mount {0} {4} -t {1} {2} {3}", cer, mountPoint.IsReadOnly ? "-r" : "-w", mountPoint.FileSystem, mountPoint.Block, mountPoint.Name, !String.IsNullOrEmpty(options) ? String.Format("-o {0}", options) : String.Empty); }
/// <summary> /// Unmounts the specified mount point. /// </summary> /// <param name="mountPoint">The mountPoint.</param> /// <param name="options">The options.</param> public void Unmount(MountPoint mountPoint, String options) { mountPoint.ThrowIfNull("mountPoint"); Unmount(mountPoint.Name, options); }