Пример #1
0
 /// <summary>
 /// Modify the permissions of the given file/folder.
 /// Only works on *NIX systems, and not on Windows/IIS servers.
 /// Only works if the FTP server supports the SITE CHMOD command
 /// (requires the CHMOD extension to be installed and enabled).
 /// Throws FtpCommandException if there is an issue.
 /// </summary>
 /// <param name="path">The full or relative path to the item</param>
 /// <param name="owner">The owner permissions</param>
 /// <param name="group">The group permissions</param>
 /// <param name="other">The other permissions</param>
 /// <param name="token">The token that can be used to cancel the entire process</param>
 public Task SetFilePermissionsAsync(string path, FtpPermission owner, FtpPermission group, FtpPermission other, CancellationToken token = default(CancellationToken))
 {
     return(SetFilePermissionsAsync(path, Permissions.CalcChmod(owner, group, other), token));
 }
Пример #2
0
 /// <summary>
 /// Modify the permissions of the given file/folder.
 /// Only works on *NIX systems, and not on Windows/IIS servers.
 /// Only works if the FTP server supports the SITE CHMOD command
 /// (requires the CHMOD extension to be installed and enabled).
 /// Throws FtpCommandException if there is an issue.
 /// </summary>
 /// <param name="path">The full or relative path to the item</param>
 /// <param name="owner">The owner permissions</param>
 /// <param name="group">The group permissions</param>
 /// <param name="other">The other permissions</param>
 public void SetFilePermissions(string path, FtpPermission owner, FtpPermission group, FtpPermission other)
 {
     SetFilePermissions(path, Permissions.CalcChmod(owner, group, other));
 }