Method SetAttributesAsync
SetAttributesAsync(string, SftpFileAttributes, CancellationToken)
Changes the attributes that are set in attributes (size, owner, permissions, times).
public Task SetAttributesAsync(string path, SftpFileAttributes attributes, CancellationToken cancellationToken = default)
Parameters
pathstringattributesSftpFileAttributescancellationTokenCancellationToken
Returns
SetAttributesAsync(string, SftpFileAttributes, bool, CancellationToken)
Changes the attributes that are set in attributes; of a symbolic link itself when
followSymbolicLinks is false (lsetstat@openssh.com, OpenSSH 8.0+: owner, permissions and times; a
server may refuse a size).
public Task SetAttributesAsync(string path, SftpFileAttributes attributes, bool followSymbolicLinks, CancellationToken cancellationToken = default)
Parameters
pathstringattributesSftpFileAttributesfollowSymbolicLinksboolcancellationTokenCancellationToken
Returns
Exceptions
- NotSupportedException
Not following links, and the server lacks
lsetstat@openssh.com.