using System; namespace Renci.SshNet.Sftp { /// /// Represents SFTP file information. /// public interface ISftpFile { /// /// Gets the file attributes. /// SftpFileAttributes Attributes { get; } /// /// Gets the full path of the file or directory. /// /// /// The full path of the file or directory. /// string FullName { get; } /// /// Gets the name of the file or directory. /// /// /// The name of the file or directory. /// /// /// For directories, this is the name of the last directory in the hierarchy if a hierarchy exists; /// otherwise, the name of the directory. /// string Name { get; } /// /// Gets or sets the time the current file or directory was last accessed. /// /// /// The time that the current file or directory was last accessed. /// DateTime LastAccessTime { get; set; } /// /// Gets or sets the time when the current file or directory was last written to. /// /// /// The time the current file was last written. /// DateTime LastWriteTime { get; set; } /// /// Gets or sets the time, in coordinated universal time (UTC), the current file or directory was last accessed. /// /// /// The time that the current file or directory was last accessed. /// DateTime LastAccessTimeUtc { get; set; } /// /// Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to. /// /// /// The time the current file was last written. /// DateTime LastWriteTimeUtc { get; set; } /// /// Gets the size, in bytes, of the current file. /// /// /// The size of the current file in bytes. /// long Length { get; } /// /// Gets or sets file user id. /// /// /// File user id. /// int UserId { get; set; } /// /// Gets or sets file group id. /// /// /// File group id. /// int GroupId { get; set; } /// /// Gets a value indicating whether file represents a socket. /// /// /// true if file represents a socket; otherwise, false. /// bool IsSocket { get; } /// /// Gets a value indicating whether file represents a symbolic link. /// /// /// true if file represents a symbolic link; otherwise, false. /// bool IsSymbolicLink { get; } /// /// Gets a value indicating whether file represents a regular file. /// /// /// true if file represents a regular file; otherwise, false. /// bool IsRegularFile { get; } /// /// Gets a value indicating whether file represents a block device. /// /// /// true if file represents a block device; otherwise, false. /// bool IsBlockDevice { get; } /// /// Gets a value indicating whether file represents a directory. /// /// /// true if file represents a directory; otherwise, false. /// bool IsDirectory { get; } /// /// Gets a value indicating whether file represents a character device. /// /// /// true if file represents a character device; otherwise, false. /// bool IsCharacterDevice { get; } /// /// Gets a value indicating whether file represents a named pipe. /// /// /// true if file represents a named pipe; otherwise, false. /// bool IsNamedPipe { get; } /// /// Gets or sets a value indicating whether the owner can read from this file. /// /// /// true if owner can read from this file; otherwise, false. /// bool OwnerCanRead { get; set; } /// /// Gets or sets a value indicating whether the owner can write into this file. /// /// /// true if owner can write into this file; otherwise, false. /// bool OwnerCanWrite { get; set; } /// /// Gets or sets a value indicating whether the owner can execute this file. /// /// /// true if owner can execute this file; otherwise, false. /// bool OwnerCanExecute { get; set; } /// /// Gets or sets a value indicating whether the group members can read from this file. /// /// /// true if group members can read from this file; otherwise, false. /// bool GroupCanRead { get; set; } /// /// Gets or sets a value indicating whether the group members can write into this file. /// /// /// true if group members can write into this file; otherwise, false. /// bool GroupCanWrite { get; set; } /// /// Gets or sets a value indicating whether the group members can execute this file. /// /// /// true if group members can execute this file; otherwise, false. /// bool GroupCanExecute { get; set; } /// /// Gets or sets a value indicating whether the others can read from this file. /// /// /// true if others can read from this file; otherwise, false. /// bool OthersCanRead { get; set; } /// /// Gets or sets a value indicating whether the others can write into this file. /// /// /// true if others can write into this file; otherwise, false. /// bool OthersCanWrite { get; set; } /// /// Gets or sets a value indicating whether the others can execute this file. /// /// /// true if others can execute this file; otherwise, false. /// bool OthersCanExecute { get; set; } /// /// Sets file permissions. /// /// The mode. void SetPermissions(short mode); /// /// Permanently deletes a file on remote machine. /// void Delete(); /// /// Moves a specified file to a new location on remote machine, providing the option to specify a new file name. /// /// The path to move the file to, which can specify a different file name. /// is null. void MoveTo(string destFileName); /// /// Updates file status on the server. /// void UpdateStatus(); } }