/// <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( ); if (Device.BusyBox.Available) { Device.ExecuteShellCommand("busybox 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); } else { 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); }
/// <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 ); }
/// <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 ( ); if ( Device.BusyBox.Available ) { Device.ExecuteShellCommand ( "busybox 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 ); } else { 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 ); } }