Class DotNetFileSystem
A IUnixFileSystem implementation that uses the
standard .NET functionality to access the file system.
Inheritance
DotNetFileSystem
Assembly: FubarDev.FtpServer.FileSystem.DotNet.dll
Syntax
public class DotNetFileSystem : IUnixFileSystem
Constructors
|
Improve this Doc
View Source
DotNetFileSystem(String, Boolean)
Declaration
public DotNetFileSystem(string rootPath, bool allowNonEmptyDirectoryDelete)
Parameters
Type |
Name |
Description |
String |
rootPath |
The path to use as root.
|
Boolean |
allowNonEmptyDirectoryDelete |
Defines whether the deletion of non-empty directories is allowed.
|
|
Improve this Doc
View Source
DotNetFileSystem(String, Boolean, Int32)
Declaration
public DotNetFileSystem(string rootPath, bool allowNonEmptyDirectoryDelete, int streamBufferSize)
Parameters
Type |
Name |
Description |
String |
rootPath |
The path to use as root.
|
Boolean |
allowNonEmptyDirectoryDelete |
Defines whether the deletion of non-empty directories is allowed.
|
Int32 |
streamBufferSize |
Buffer size to be used in async IO methods.
|
Fields
|
Improve this Doc
View Source
DefaultStreamBufferSize
The default buffer size for copying from one stream to another.
Declaration
public static readonly int DefaultStreamBufferSize
Field Value
Properties
|
Improve this Doc
View Source
FileSystemEntryComparer
Declaration
public StringComparer FileSystemEntryComparer { get; }
Property Value
|
Improve this Doc
View Source
Root
Declaration
public IUnixDirectoryEntry Root { get; }
Property Value
|
Improve this Doc
View Source
SupportsAppend
Declaration
public bool SupportsAppend { get; }
Property Value
|
Improve this Doc
View Source
SupportsNonEmptyDirectoryDelete
Declaration
public bool SupportsNonEmptyDirectoryDelete { get; }
Property Value
Methods
|
Improve this Doc
View Source
AppendAsync(IUnixFileEntry, Nullable<Int64>, Stream, CancellationToken)
Declaration
public Task<IBackgroundTransfer? > AppendAsync(IUnixFileEntry fileEntry, long? startPosition, Stream data, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
CreateAsync(IUnixDirectoryEntry, String, Stream, CancellationToken)
Declaration
public Task<IBackgroundTransfer? > CreateAsync(IUnixDirectoryEntry targetDirectory, string fileName, Stream data, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
CreateDirectoryAsync(IUnixDirectoryEntry, String, CancellationToken)
Declaration
public Task<IUnixDirectoryEntry> CreateDirectoryAsync(IUnixDirectoryEntry targetDirectory, string directoryName, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
GetEntriesAsync(IUnixDirectoryEntry, CancellationToken)
Declaration
public Task<IReadOnlyList<IUnixFileSystemEntry>> GetEntriesAsync(IUnixDirectoryEntry directoryEntry, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
GetEntryByNameAsync(IUnixDirectoryEntry, String, CancellationToken)
Declaration
public Task<IUnixFileSystemEntry? > GetEntryByNameAsync(IUnixDirectoryEntry directoryEntry, string name, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
MoveAsync(IUnixDirectoryEntry, IUnixFileSystemEntry, IUnixDirectoryEntry, String, CancellationToken)
Declaration
public Task<IUnixFileSystemEntry> MoveAsync(IUnixDirectoryEntry parent, IUnixFileSystemEntry source, IUnixDirectoryEntry target, string fileName, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
OpenReadAsync(IUnixFileEntry, Int64, CancellationToken)
Declaration
public Task<Stream> OpenReadAsync(IUnixFileEntry fileEntry, long startPosition, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
ReplaceAsync(IUnixFileEntry, Stream, CancellationToken)
Declaration
public Task<IBackgroundTransfer? > ReplaceAsync(IUnixFileEntry fileEntry, Stream data, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
SetMacTimeAsync(IUnixFileSystemEntry, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, CancellationToken)
Sets the modify/access/create timestamp of a file system item.
Declaration
public Task<IUnixFileSystemEntry> SetMacTimeAsync(IUnixFileSystemEntry entry, DateTimeOffset? modify, DateTimeOffset? access, DateTimeOffset? create, CancellationToken cancellationToken)
Parameters
Returns
|
Improve this Doc
View Source
UnlinkAsync(IUnixFileSystemEntry, CancellationToken)
Declaration
public Task UnlinkAsync(IUnixFileSystemEntry entry, CancellationToken cancellationToken)
Parameters
Returns
Implements