<PackageReference Include="SSH.NET" Version="2023.0.0" />

ISftpFile

public interface ISftpFile
Represents SFTP file information.

Gets the file attributes.

string FullName { get; }

Gets the full path of the file or directory.

bool GroupCanExecute { get; set; }

Gets or sets a value indicating whether the group members can execute this file.

bool GroupCanRead { get; set; }

Gets or sets a value indicating whether the group members can read from this file.

bool GroupCanWrite { get; set; }

Gets or sets a value indicating whether the group members can write into this file.

int GroupId { get; set; }

Gets or sets file group id.

bool IsBlockDevice { get; }

Gets a value indicating whether file represents a block device.

bool IsCharacterDevice { get; }

Gets a value indicating whether file represents a character device.

bool IsDirectory { get; }

Gets a value indicating whether file represents a directory.

bool IsNamedPipe { get; }

Gets a value indicating whether file represents a named pipe.

bool IsRegularFile { get; }

Gets a value indicating whether file represents a regular file.

bool IsSocket { get; }

Gets a value indicating whether file represents a socket.

bool IsSymbolicLink { get; }

Gets a value indicating whether file represents a symbolic link.

DateTime LastAccessTime { get; set; }

Gets or sets the time the current file or directory was last accessed.

Gets or sets the time, in coordinated universal time (UTC), the current file or directory was last accessed.

DateTime LastWriteTime { get; set; }

Gets or sets the time when the current file or directory was last written to.

DateTime LastWriteTimeUtc { get; set; }

Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to.

long Length { get; }

Gets the size, in bytes, of the current file.

string Name { get; }

Gets the name of the file or directory.

bool OthersCanExecute { get; set; }

Gets or sets a value indicating whether the others can execute this file.

bool OthersCanRead { get; set; }

Gets or sets a value indicating whether the others can read from this file.

bool OthersCanWrite { get; set; }

Gets or sets a value indicating whether the others can write into this file.

bool OwnerCanExecute { get; set; }

Gets or sets a value indicating whether the owner can execute this file.

bool OwnerCanRead { get; set; }

Gets or sets a value indicating whether the owner can read from this file.

bool OwnerCanWrite { get; set; }

Gets or sets a value indicating whether the owner can write into this file.

int UserId { get; set; }

Gets or sets file user id.

void Delete()

Permanently deletes a file on remote machine.

void MoveTo(string destFileName)

Moves a specified file to a new location on remote machine, providing the option to specify a new file name.

void SetPermissions(short mode)

Sets file permissions.

void UpdateStatus()

Updates file status on the server.