C# Class FubarDev.FtpServer.FileSystem.DotNet.DotNetFileSystem

A IUnixFileSystem implementation that uses the standard .NET functionality to access the file system.
Inheritance: IUnixFileSystem
ファイルを表示 Open project: FubarDevelopment/FtpServer Class Usage Examples

Public Properties

Property Type Description
DEFAULT_STREAM_BUFFER_SIZE int

Public Methods

Method Description
AppendAsync ( IUnixFileEntry fileEntry, long startPosition, Stream data, CancellationToken cancellationToken ) : Task
CreateAsync ( IUnixDirectoryEntry targetDirectory, string fileName, Stream data, CancellationToken cancellationToken ) : Task
CreateDirectoryAsync ( IUnixDirectoryEntry targetDirectory, string directoryName, CancellationToken cancellationToken ) : Task
Dispose ( ) : void
DotNetFileSystem ( string rootPath, bool allowNonEmptyDirectoryDelete ) : System

Initializes a new instance of the DotNetFileSystem class.

DotNetFileSystem ( string rootPath, bool allowNonEmptyDirectoryDelete, int streamBufferSize ) : System

Initializes a new instance of the DotNetFileSystem class.

GetEntriesAsync ( IUnixDirectoryEntry directoryEntry, CancellationToken cancellationToken ) : Task>
GetEntryByNameAsync ( IUnixDirectoryEntry directoryEntry, string name, CancellationToken cancellationToken ) : Task
MoveAsync ( IUnixDirectoryEntry parent, IUnixFileSystemEntry source, IUnixDirectoryEntry target, string fileName, CancellationToken cancellationToken ) : Task
OpenReadAsync ( IUnixFileEntry fileEntry, long startPosition, CancellationToken cancellationToken ) : Task
ReplaceAsync ( IUnixFileEntry fileEntry, Stream data, CancellationToken cancellationToken ) : Task
SetMacTimeAsync ( IUnixFileSystemEntry entry, DateTimeOffset modify, DateTimeOffset access, DateTimeOffset create, CancellationToken cancellationToken ) : Task

Sets the modify/access/create timestamp of a file system item

UnlinkAsync ( IUnixFileSystemEntry entry, CancellationToken cancellationToken ) : Task

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Dispose the object

Method Details

AppendAsync() public method

public AppendAsync ( IUnixFileEntry fileEntry, long startPosition, Stream data, CancellationToken cancellationToken ) : Task
fileEntry IUnixFileEntry
startPosition long
data Stream
cancellationToken System.Threading.CancellationToken
return Task

CreateAsync() public method

public CreateAsync ( IUnixDirectoryEntry targetDirectory, string fileName, Stream data, CancellationToken cancellationToken ) : Task
targetDirectory IUnixDirectoryEntry
fileName string
data Stream
cancellationToken System.Threading.CancellationToken
return Task

CreateDirectoryAsync() public method

public CreateDirectoryAsync ( IUnixDirectoryEntry targetDirectory, string directoryName, CancellationToken cancellationToken ) : Task
targetDirectory IUnixDirectoryEntry
directoryName string
cancellationToken System.Threading.CancellationToken
return Task

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

Dispose the object
protected Dispose ( bool disposing ) : void
disposing bool true when called from
return void

DotNetFileSystem() public method

Initializes a new instance of the DotNetFileSystem class.
public DotNetFileSystem ( string rootPath, bool allowNonEmptyDirectoryDelete ) : System
rootPath string The path to use as root
allowNonEmptyDirectoryDelete bool Allow deletion of non-empty directories?
return System

DotNetFileSystem() public method

Initializes a new instance of the DotNetFileSystem class.
public DotNetFileSystem ( string rootPath, bool allowNonEmptyDirectoryDelete, int streamBufferSize ) : System
rootPath string The path to use as root
allowNonEmptyDirectoryDelete bool Allow deletion of non-empty directories?
streamBufferSize int Buffer size to be used in async IO methods
return System

GetEntriesAsync() public method

public GetEntriesAsync ( IUnixDirectoryEntry directoryEntry, CancellationToken cancellationToken ) : Task>
directoryEntry IUnixDirectoryEntry
cancellationToken System.Threading.CancellationToken
return Task>

GetEntryByNameAsync() public method

public GetEntryByNameAsync ( IUnixDirectoryEntry directoryEntry, string name, CancellationToken cancellationToken ) : Task
directoryEntry IUnixDirectoryEntry
name string
cancellationToken System.Threading.CancellationToken
return Task

MoveAsync() public method

public MoveAsync ( IUnixDirectoryEntry parent, IUnixFileSystemEntry source, IUnixDirectoryEntry target, string fileName, CancellationToken cancellationToken ) : Task
parent IUnixDirectoryEntry
source IUnixFileSystemEntry
target IUnixDirectoryEntry
fileName string
cancellationToken System.Threading.CancellationToken
return Task

OpenReadAsync() public method

public OpenReadAsync ( IUnixFileEntry fileEntry, long startPosition, CancellationToken cancellationToken ) : Task
fileEntry IUnixFileEntry
startPosition long
cancellationToken System.Threading.CancellationToken
return Task

ReplaceAsync() public method

public ReplaceAsync ( IUnixFileEntry fileEntry, Stream data, CancellationToken cancellationToken ) : Task
fileEntry IUnixFileEntry
data Stream
cancellationToken System.Threading.CancellationToken
return Task

SetMacTimeAsync() public method

Sets the modify/access/create timestamp of a file system item
public SetMacTimeAsync ( IUnixFileSystemEntry entry, DateTimeOffset modify, DateTimeOffset access, DateTimeOffset create, CancellationToken cancellationToken ) : Task
entry IUnixFileSystemEntry The to change the timestamp for
modify DateTimeOffset The modification timestamp
access DateTimeOffset The access timestamp
create DateTimeOffset The creation timestamp
cancellationToken System.Threading.CancellationToken The cancellation token
return Task

UnlinkAsync() public method

public UnlinkAsync ( IUnixFileSystemEntry entry, CancellationToken cancellationToken ) : Task
entry IUnixFileSystemEntry
cancellationToken System.Threading.CancellationToken
return Task

Property Details

DEFAULT_STREAM_BUFFER_SIZE public_oe static_oe property

public static int DEFAULT_STREAM_BUFFER_SIZE
return int