Search Results for

    Interface ISshFileHandle

    Represents an open SFTP file handle for direct data operations.

    Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions.Models
    Assembly: ApacheMinaSSHD.NET.Wrapper.dll
    Syntax
    public interface ISshFileHandle

    Properties

    | Edit this page View Source

    AccessMask

    Gets the SFTP access mask used to open the file.

    Declaration
    int AccessMask { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Attributes

    Gets file attributes captured for the handle.

    Declaration
    IReadOnlyDictionary<string, object> Attributes { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, object>
    | Edit this page View Source

    IsOpenAppend

    Gets whether the file is open in append mode.

    Declaration
    bool IsOpenAppend { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SshHandle

    Gets the underlying safe handle metadata.

    Declaration
    ISshHandle SshHandle { get; }
    Property Value
    Type Description
    ISshHandle

    Methods

    | Edit this page View Source

    Append(byte[], int, int?)

    Appends data to the file.

    Declaration
    void Append(byte[] data, int offset = 0, int? length = null)
    Parameters
    Type Name Description
    byte[] data

    The source buffer.

    int offset

    The source buffer offset.

    int? length

    The number of bytes to append, or null for the remaining buffer.

    | Edit this page View Source

    AsStream()

    Returns a .NET stream wrapper over this file handle.

    Declaration
    Stream AsStream()
    Returns
    Type Description
    Stream

    A stream backed by this SFTP file handle.

    | Edit this page View Source

    Close()

    Closes the file handle.

    Declaration
    void Close()
    | Edit this page View Source

    Lock(long, long, int)

    Locks a file region.

    Declaration
    void Lock(long offset, long length, int mask)
    Parameters
    Type Name Description
    long offset

    The file region offset.

    long length

    The file region length.

    int mask

    The lock mask supplied by the client.

    | Edit this page View Source

    Read(byte[], long, out bool, int, int?)

    Reads data from the file and reports end-of-file state.

    Declaration
    int Read(byte[] data, long fileOffset, out bool isEof, int dataOffset = 0, int? length = null)
    Parameters
    Type Name Description
    byte[] data

    The destination buffer.

    long fileOffset

    The file offset to read from.

    bool isEof

    Set to true when the read reaches end-of-file.

    int dataOffset

    The destination buffer offset.

    int? length

    The number of bytes to read, or null for the remaining buffer.

    Returns
    Type Description
    int

    The number of bytes read.

    | Edit this page View Source

    Read(byte[], long, int, int?)

    Reads data from the file.

    Declaration
    int Read(byte[] data, long fileOffset, int dataOffset = 0, int? length = null)
    Parameters
    Type Name Description
    byte[] data

    The destination buffer.

    long fileOffset

    The file offset to read from.

    int dataOffset

    The destination buffer offset.

    int? length

    The number of bytes to read, or null for the remaining buffer.

    Returns
    Type Description
    int

    The number of bytes read.

    | Edit this page View Source

    Unlock(long, long)

    Unlocks a file region.

    Declaration
    void Unlock(long offset, long length)
    Parameters
    Type Name Description
    long offset

    The file region offset.

    long length

    The file region length.

    | Edit this page View Source

    Write(byte[], long, int, int?)

    Writes data to the file.

    Declaration
    void Write(byte[] data, long fileOffset, int dataOffset = 0, int? length = null)
    Parameters
    Type Name Description
    byte[] data

    The source buffer.

    long fileOffset

    The file offset to write to.

    int dataOffset

    The source buffer offset.

    int? length

    The number of bytes to write, or null for the remaining buffer.

    • Edit this page
    • View Source
    In this article
    Back to top Porta SFTP ServerGitHubApacheMinaSSHD.NET Generated by DocFX