<PackageReference Include="SSH.NET" Version="2014.4.6-beta2" />

SftpFile

public class SftpFile
Represents SFTP file information

Gets the file attributes.

public IDictionary<string, string> Extensions { get; }

Gets the extension part of the file.

public string FullName { get; }

Gets the full path of the directory or file.

public bool GroupCanExecute { get; set; }

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

public bool GroupCanRead { get; set; }

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

public bool GroupCanWrite { get; set; }

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

public int GroupId { get; set; }

Gets or sets file group id.

public bool IsBlockDevice { get; }

Gets a value indicating whether file represents a block device.

public bool IsCharacterDevice { get; }

Gets a value indicating whether file represents a character device.

public bool IsDirectory { get; }

Gets a value indicating whether file represents a directory.

public bool IsNamedPipe { get; }

Gets a value indicating whether file represents a named pipe.

public bool IsRegularFile { get; }

Gets a value indicating whether file represents a regular file.

public bool IsSocket { get; }

Gets a value indicating whether file represents a socket.

public bool IsSymbolicLink { get; }

Gets a value indicating whether file represents a symbolic link.

public DateTime LastAccessTime { get; set; }

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

public DateTime LastAccessTimeUtc { get; set; }

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

public DateTime LastWriteTime { get; set; }

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

public DateTime LastWriteTimeUtc { get; set; }

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

public long Length { get; }

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

public string Name { get; }

For files, gets the name of the file. For directories, gets the name of the last directory in the hierarchy if a hierarchy exists. Otherwise, the Name property gets the name of the directory.

public bool OthersCanExecute { get; set; }

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

public bool OthersCanRead { get; set; }

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

public bool OthersCanWrite { get; set; }

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

public bool OwnerCanExecute { get; set; }

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

public bool OwnerCanRead { get; set; }

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

public bool OwnerCanWrite { get; set; }

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

public int UserId { get; set; }

Gets or sets file user id.

public void Delete()

Permanently deletes a file on remote machine.

public void MoveTo(string destFileName)

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

public void SetPermissions(short mode)

Sets file permissions.

public void UpdateStatus()

Updates file status on the server.