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

A IUnixFileSystem implementation that uses the standard .NET functionality to access the file system.
Inheritance: IUnixFileSystem
Afficher le fichier Open project: FubarDevelopment/FtpServer Class Usage Examples

Méthodes publiques

Свойство Type Description
DEFAULT_STREAM_BUFFER_SIZE int

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Dispose the object

Method Details

AppendAsync() public méthode

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

CreateAsync() public méthode

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

CreateDirectoryAsync() public méthode

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

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Dispose the object
protected Dispose ( bool disposing ) : void
disposing bool true when called from
Résultat void

DotNetFileSystem() public méthode

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?
Résultat System

DotNetFileSystem() public méthode

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
Résultat System

GetEntriesAsync() public méthode

public GetEntriesAsync ( IUnixDirectoryEntry directoryEntry, CancellationToken cancellationToken ) : Task>
directoryEntry IUnixDirectoryEntry
cancellationToken System.Threading.CancellationToken
Résultat Task>

GetEntryByNameAsync() public méthode

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

MoveAsync() public méthode

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
Résultat Task

OpenReadAsync() public méthode

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

ReplaceAsync() public méthode

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

SetMacTimeAsync() public méthode

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
Résultat Task

UnlinkAsync() public méthode

public UnlinkAsync ( IUnixFileSystemEntry entry, CancellationToken cancellationToken ) : Task
entry IUnixFileSystemEntry
cancellationToken System.Threading.CancellationToken
Résultat Task

Property Details

DEFAULT_STREAM_BUFFER_SIZE public_oe static_oe property

public static int DEFAULT_STREAM_BUFFER_SIZE
Résultat int