示例#1
0
        /// <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);
        }
示例#2
0
文件: FileSystem.cs 项目: vebin/madb
        /// <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);
        }
示例#3
0
文件: FileSystem.cs 项目: vebin/madb
        /// <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);
        }
示例#4
0
        /// <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);
        }