Table of Contents

Method SetAttributesAsync

Namespace
SshSharp.Sftp
Assembly
SshSharp.dll

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

path string
attributes SftpFileAttributes
cancellationToken CancellationToken

Returns

Task

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

path string
attributes SftpFileAttributes
followSymbolicLinks bool
cancellationToken CancellationToken

Returns

Task

Exceptions

NotSupportedException

Not following links, and the server lacks lsetstat@openssh.com.