Interface IAMNetScpFileOpener
Provides .NET-facing hooks for SCP path resolution, filtering, metadata, and stream lifecycle events.
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public interface IAMNetScpFileOpener
Remarks
Implement this interface to enforce application-specific SCP authorization and storage rules without importing Apache MINA or Java types.
Methods
| Edit this page View SourceCloseRead(ISshScpFileAccess)
Called after a local file read/send handle is closed.
Declaration
void CloseRead(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
CloseWrite(ISshScpFileAccess)
Called after a local file write/receive handle is closed.
Declaration
void CloseWrite(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
CreateSourceStreamResolver(ISshScpFileAccess)
Called when the server creates an outgoing SCP source stream resolver.
Declaration
void CreateSourceStreamResolver(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
CreateTargetStreamResolver(ISshScpFileAccess)
Called when the server creates an incoming SCP target stream resolver.
Declaration
void CreateTargetStreamResolver(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
GetLocalFilePermissions(ISshScpFileAccess, IReadOnlyList<string>)
Allows the application to filter or rewrite local file permissions reported to SCP clients.
Declaration
IReadOnlyList<string> GetLocalFilePermissions(ISshScpFileAccess access, IReadOnlyList<string> permissions)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| IReadOnlyList<string> | permissions | The default permission names. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> | The permission names to use. |
GetMatchingFilesToSend(ISshScpFileAccess, IReadOnlyList<string>)
Filters or rewrites files that match an outgoing SCP pattern.
Declaration
IReadOnlyList<string> GetMatchingFilesToSend(ISshScpFileAccess access, IReadOnlyList<string> resolvedPaths)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| IReadOnlyList<string> | resolvedPaths | The default matching local paths. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> | The local paths that may be sent. |
IsPathAllowed(ISshScpFileAccess)
Returns whether the requested SCP path or operation is allowed.
Declaration
bool IsPathAllowed(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
Returns
| Type | Description |
|---|---|
| bool |
|
OpenRead(ISshScpFileAccess)
Called before a local file is opened for SCP read/send.
Declaration
void OpenRead(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
OpenWrite(ISshScpFileAccess)
Called before a local file is opened for SCP write/receive.
Declaration
void OpenWrite(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
ReadLocalBasicFileAttributes(ISshScpFileAccess, IReadOnlyDictionary<string, object>)
Allows the application to filter or rewrite file attributes reported to SCP clients.
Declaration
IReadOnlyDictionary<string, object> ReadLocalBasicFileAttributes(ISshScpFileAccess access, IReadOnlyDictionary<string, object> attributes)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| IReadOnlyDictionary<string, object> | attributes | The default attributes. |
Returns
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, object> | The attributes to use. |
ResolveIncomingFilePath(ISshScpFileAccess, string)
Allows the application to rewrite the destination path for an incoming file.
Declaration
string ResolveIncomingFilePath(ISshScpFileAccess access, string resolvedPath)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| string | resolvedPath | The default resolved path. |
Returns
| Type | Description |
|---|---|
| string | The local path to use for the incoming file. |
ResolveIncomingReceiveLocation(ISshScpFileAccess, string)
Allows the application to rewrite the receive location for incoming SCP data.
Declaration
string ResolveIncomingReceiveLocation(ISshScpFileAccess access, string resolvedPath)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| string | resolvedPath | The default resolved path. |
Returns
| Type | Description |
|---|---|
| string | The local receive location to use. |
ResolveLocalPath(ISshScpFileAccess, string)
Allows the application to rewrite a client path into a local path.
Declaration
string ResolveLocalPath(ISshScpFileAccess access, string resolvedPath)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| string | resolvedPath | The default resolved path. |
Returns
| Type | Description |
|---|---|
| string | The local path to use. |
ResolveOutgoingFilePath(ISshScpFileAccess, string)
Allows the application to rewrite the source path for an outgoing file.
Declaration
string ResolveOutgoingFilePath(ISshScpFileAccess access, string resolvedPath)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| string | resolvedPath | The default resolved path. |
Returns
| Type | Description |
|---|---|
| string | The local path to send. |
ShouldIncludeDirectoryEntry(ISshScpFileAccess)
Returns whether a directory entry should be visible during recursive SCP.
Declaration
bool ShouldIncludeDirectoryEntry(ISshScpFileAccess access)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
Returns
| Type | Description |
|---|---|
| bool |
|
ShouldSendAsDirectory(ISshScpFileAccess, bool)
Returns whether the path should be sent as a directory.
Declaration
bool ShouldSendAsDirectory(ISshScpFileAccess access, bool defaultValue)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| bool | defaultValue | The default server decision. |
Returns
| Type | Description |
|---|---|
| bool | The decision to use. |
ShouldSendAsRegularFile(ISshScpFileAccess, bool)
Returns whether the path should be sent as a regular file.
Declaration
bool ShouldSendAsRegularFile(ISshScpFileAccess access, bool defaultValue)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshScpFileAccess | access | Operation metadata for the SCP request. |
| bool | defaultValue | The default server decision. |
Returns
| Type | Description |
|---|---|
| bool | The decision to use. |