Interface IAMNetSftpFileSystemAccessor
Provides .NET-facing hooks for SFTP path resolution, filtering, attributes, and filesystem operations.
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public interface IAMNetSftpFileSystemAccessor
Remarks
Implement this interface when the application needs full control over SFTP authorization and storage policy. Return values are already translated to .NET types; application code does not need Java or Apache MINA imports.
Methods
| Edit this page View SourceApplyExtensionFileAttributes(ISshFileSystemAccess)
Called when extension attributes are being applied to a file.
Declaration
void ApplyExtensionFileAttributes(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
CloseDirectory(ISshFileSystemAccess)
Called when an SFTP directory handle is closed.
Declaration
void CloseDirectory(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
CloseFile(ISshFileSystemAccess)
Called when an SFTP file handle is closed.
Declaration
void CloseFile(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
CopyFile(ISshFileSystemAccess)
Called when a client attempts to copy a file.
Declaration
void CopyFile(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
CreateDirectory(ISshFileSystemAccess)
Called when a client attempts to create a directory.
Declaration
void CreateDirectory(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
CreateLink(ISshFileSystemAccess)
Called when a client attempts to create a hard link or symbolic link.
Declaration
void CreateLink(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
IsPathAllowed(ISshFileSystemAccess)
Returns whether the requested SFTP path or operation is allowed.
Declaration
bool IsPathAllowed(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request being evaluated. |
Returns
| Type | Description |
|---|---|
| bool |
|
NoFollow(ISshFileSystemAccess, bool)
Returns whether symlinks should be treated as no-follow for the current request.
Declaration
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. |
OpenDirectory(ISshFileSystemAccess)
Called when an SFTP directory handle is opened.
Declaration
void OpenDirectory(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
OpenFile(ISshFileSystemAccess)
Called before or during SFTP file open handling.
Declaration
void OpenFile(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
PutRemoteFileName(ISshFileSystemAccess)
Called when the server is preparing a remote filename response.
Declaration
void PutRemoteFileName(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
ReadFileAttributes(ISshFileSystemAccess, IReadOnlyDictionary<string, object>)
Allows the application to filter or rewrite attributes read from a file.
Declaration
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. |
RemoveFile(ISshFileSystemAccess)
Called when a client attempts to remove a file or directory.
Declaration
void RemoveFile(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
RenameFile(ISshFileSystemAccess)
Called when a client attempts to rename or move a file.
Declaration
void RenameFile(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
ResolveFileAccessLinkOptions(ISshFileSystemAccess, IReadOnlyList<string>)
Allows the application to adjust link-following options used for file access.
Declaration
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. |
ResolveFileOwner(ISshFileSystemAccess)
Called when file owner information is resolved.
Declaration
void ResolveFileOwner(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
ResolveGroupOwner(ISshFileSystemAccess)
Called when group owner information is resolved.
Declaration
void ResolveGroupOwner(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
ResolveLinkTarget(ISshFileSystemAccess, string)
Allows the application to rewrite a symbolic link target reported to the client.
Declaration
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. |
ResolveLocalFilePath(ISshFileSystemAccess, string)
Allows the application to rewrite the resolved local path for an SFTP request.
Declaration
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. |
ResolveReportedFileAttributes(ISshFileSystemAccess, IReadOnlyDictionary<string, object>)
Allows the application to filter or rewrite attributes reported to clients.
Declaration
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. |
SetFileAccessControl(ISshFileSystemAccess)
Called when a client attempts to set file access control information.
Declaration
void SetFileAccessControl(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
SetFileAttribute(ISshFileSystemAccess)
Called when a client sets a file attribute.
Declaration
void SetFileAttribute(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
SetFileOwner(ISshFileSystemAccess)
Called when a client attempts to set file owner information.
Declaration
void SetFileOwner(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
SetFilePermissions(ISshFileSystemAccess)
Called when a client attempts to set file permissions.
Declaration
void SetFilePermissions(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
SetGroupOwner(ISshFileSystemAccess)
Called when a client attempts to set group owner information.
Declaration
void SetGroupOwner(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
ShouldIncludeDirectoryEntry(ISshFileSystemAccess)
Returns whether a directory entry should be visible to the client.
Declaration
bool ShouldIncludeDirectoryEntry(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the directory entry. |
Returns
| Type | Description |
|---|---|
| bool |
|
SyncFileData(ISshFileSystemAccess)
Called when a client requests file data synchronization.
Declaration
void SyncFileData(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the request. |
TryLock(ISshFileSystemAccess)
Called when a client attempts to lock a file region.
Declaration
void TryLock(ISshFileSystemAccess context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshFileSystemAccess | context | Operation metadata for the lock request. |