コード例 #1
0
ファイル: FileSystem.cs プロジェクト: vebin/madb
        /// <summary>
        /// Chmods the specified path.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="permissions">The permissions.</param>
        public void Chmod(String path, FilePermissions permissions)
        {
            Device.ThrowIfNull("Device");
            path.ThrowIfNullOrWhiteSpace("path");
            permissions.ThrowIfNull("permissions");

            FileEntry entry = this.fileListingService.FindFileEntry(path);
            CommandErrorReceiver cer = new CommandErrorReceiver();
            Device.ExecuteShellCommand("chmod {0} {1}", cer, permissions.ToChmod(), entry.FullEscapedPath);
        }
コード例 #2
0
ファイル: FileSystem.cs プロジェクト: parkheeyoung/madb
        /// <summary>
        /// Chmods the specified path.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="permissions">The permissions.</param>
        public void Chmod(String path, FilePermissions permissions)
        {
            Device.ThrowIfNull("Device");
            path.ThrowIfNullOrWhiteSpace("path");
            permissions.ThrowIfNull("permissions");

            FileEntry            entry = this.fileListingService.FindFileEntry(path);
            CommandErrorReceiver cer   = new CommandErrorReceiver();

            Device.ExecuteShellCommand("chmod {0} {1}", cer, permissions.ToChmod(), entry.FullEscapedPath);
        }