Search Results for

    Class AMNetSftpFileSystemAccessor

    Default .NET-facing SFTP filesystem policy hook. Override this class to implement application-specific path resolution, filtering, and filesystem operation validation without using Apache MINA or Java types in application code.

    Inheritance
    object
    AMNetSftpFileSystemAccessor
    Implements
    IAMNetSftpFileSystemAccessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
    Assembly: ApacheMinaSSHD.NET.Wrapper.dll
    Syntax
    public class AMNetSftpFileSystemAccessor : IAMNetSftpFileSystemAccessor

    Constructors

    | Edit this page View Source

    AMNetSftpFileSystemAccessor()

    Creates a default SFTP filesystem accessor.

    Declaration
    public AMNetSftpFileSystemAccessor()

    Properties

    | Edit this page View Source

    HiddenNames

    File or directory names (case-insensitive) that should be hidden by the default policy.

    Declaration
    protected virtual IReadOnlySet<string> HiddenNames { get; }
    Property Value
    Type Description
    IReadOnlySet<string>

    Methods

    | Edit this page View Source

    ApplyExtensionFileAttributes(ISshFileSystemAccess)

    Called when extension attributes are being applied to a file.

    Declaration
    public virtual void ApplyExtensionFileAttributes(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    CloseDirectory(ISshFileSystemAccess)

    Called when an SFTP directory handle is closed.

    Declaration
    public virtual void CloseDirectory(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    CloseFile(ISshFileSystemAccess)

    Called when an SFTP file handle is closed.

    Declaration
    public virtual void CloseFile(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    CopyFile(ISshFileSystemAccess)

    Called when a client attempts to copy a file.

    Declaration
    public virtual void CopyFile(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    CreateDirectory(ISshFileSystemAccess)

    Called when a client attempts to create a directory.

    Declaration
    public virtual void CreateDirectory(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    CreateLink(ISshFileSystemAccess)

    Called when a client attempts to create a hard link or symbolic link.

    Declaration
    public virtual void CreateLink(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    IsPathAllowed(ISshFileSystemAccess)

    Returns whether the requested SFTP path or operation is allowed.

    Declaration
    public virtual bool IsPathAllowed(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request being evaluated.

    Returns
    Type Description
    bool

    true to allow the operation; otherwise false.

    | Edit this page View Source

    IsVisibleByDefault(string?)

    Returns whether a path should be visible using the default hidden-file policy.

    Declaration
    protected virtual bool IsVisibleByDefault(string? localPath)
    Parameters
    Type Name Description
    string localPath

    The local path to evaluate.

    Returns
    Type Description
    bool

    true when the path should be visible; otherwise false.

    | Edit this page View Source

    NoFollow(ISshFileSystemAccess, bool)

    Returns whether symlinks should be treated as no-follow for the current request.

    Declaration
    public virtual bool NoFollow(ISshFileSystemAccess context, bool defaultNoFollow)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    bool defaultNoFollow

    The default no-follow decision.

    Returns
    Type Description
    bool

    The no-follow decision to use.

    | Edit this page View Source

    OpenDirectory(ISshFileSystemAccess)

    Called when an SFTP directory handle is opened.

    Declaration
    public virtual void OpenDirectory(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    OpenFile(ISshFileSystemAccess)

    Called before or during SFTP file open handling.

    Declaration
    public virtual void OpenFile(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    PutRemoteFileName(ISshFileSystemAccess)

    Called when the server is preparing a remote filename response.

    Declaration
    public virtual void PutRemoteFileName(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    ReadFileAttributes(ISshFileSystemAccess, IReadOnlyDictionary<string, object>)

    Allows the application to filter or rewrite attributes read from a file.

    Declaration
    public virtual IReadOnlyDictionary<string, object> ReadFileAttributes(ISshFileSystemAccess context, IReadOnlyDictionary<string, object> resolvedAttributes)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    IReadOnlyDictionary<string, object> resolvedAttributes

    The default attributes.

    Returns
    Type Description
    IReadOnlyDictionary<string, object>

    The attributes to return to the client.

    | Edit this page View Source

    RemoveFile(ISshFileSystemAccess)

    Called when a client attempts to remove a file or directory.

    Declaration
    public virtual void RemoveFile(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    RenameFile(ISshFileSystemAccess)

    Called when a client attempts to rename or move a file.

    Declaration
    public virtual void RenameFile(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    ResolveFileAccessLinkOptions(ISshFileSystemAccess, IReadOnlyList<string>)

    Allows the application to adjust link-following options used for file access.

    Declaration
    public virtual IReadOnlyList<string> ResolveFileAccessLinkOptions(ISshFileSystemAccess context, IReadOnlyList<string> resolvedOptions)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    IReadOnlyList<string> resolvedOptions

    The default option names.

    Returns
    Type Description
    IReadOnlyList<string>

    The option names to apply.

    | Edit this page View Source

    ResolveFileOwner(ISshFileSystemAccess)

    Called when file owner information is resolved.

    Declaration
    public virtual void ResolveFileOwner(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    ResolveGroupOwner(ISshFileSystemAccess)

    Called when group owner information is resolved.

    Declaration
    public virtual void ResolveGroupOwner(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    ResolveLinkTarget(ISshFileSystemAccess, string)

    Allows the application to rewrite a symbolic link target reported to the client.

    Declaration
    public virtual string ResolveLinkTarget(ISshFileSystemAccess context, string resolvedTarget)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    string resolvedTarget

    The default resolved link target.

    Returns
    Type Description
    string

    The link target to report to the client.

    | Edit this page View Source

    ResolveLocalFilePath(ISshFileSystemAccess, string)

    Allows the application to rewrite the resolved local path for an SFTP request.

    Declaration
    public virtual string ResolveLocalFilePath(ISshFileSystemAccess context, string resolvedLocalPath)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata, including remote and resolved local paths.

    string resolvedLocalPath

    The default resolved local path.

    Returns
    Type Description
    string

    The local path to use for the operation.

    | Edit this page View Source

    ResolveReportedFileAttributes(ISshFileSystemAccess, IReadOnlyDictionary<string, object>)

    Allows the application to filter or rewrite attributes reported to clients.

    Declaration
    public virtual IReadOnlyDictionary<string, object> ResolveReportedFileAttributes(ISshFileSystemAccess context, IReadOnlyDictionary<string, object> resolvedAttributes)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    IReadOnlyDictionary<string, object> resolvedAttributes

    The default attributes.

    Returns
    Type Description
    IReadOnlyDictionary<string, object>

    The attributes to report to the client.

    | Edit this page View Source

    SetFileAccessControl(ISshFileSystemAccess)

    Called when a client attempts to set file access control information.

    Declaration
    public virtual void SetFileAccessControl(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    SetFileAttribute(ISshFileSystemAccess)

    Called when a client sets a file attribute.

    Declaration
    public virtual void SetFileAttribute(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    SetFileOwner(ISshFileSystemAccess)

    Called when a client attempts to set file owner information.

    Declaration
    public virtual void SetFileOwner(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    SetFilePermissions(ISshFileSystemAccess)

    Called when a client attempts to set file permissions.

    Declaration
    public virtual void SetFilePermissions(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    SetGroupOwner(ISshFileSystemAccess)

    Called when a client attempts to set group owner information.

    Declaration
    public virtual void SetGroupOwner(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    ShouldIncludeDirectoryEntry(ISshFileSystemAccess)

    Returns whether a directory entry should be visible to the client.

    Declaration
    public virtual bool ShouldIncludeDirectoryEntry(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the directory entry.

    Returns
    Type Description
    bool

    true to include the entry; otherwise false.

    | Edit this page View Source

    SyncFileData(ISshFileSystemAccess)

    Called when a client requests file data synchronization.

    Declaration
    public virtual void SyncFileData(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the request.

    | Edit this page View Source

    TryLock(ISshFileSystemAccess)

    Called when a client attempts to lock a file region.

    Declaration
    public virtual void TryLock(ISshFileSystemAccess context)
    Parameters
    Type Name Description
    ISshFileSystemAccess context

    Operation metadata for the lock request.

    Implements

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