FileSystem Class

Represents a file system used to store hierarchical data.

Inheritance Hierarchy

Syntax

public class FileSystem : System.IDisposable

Constructors

Name Description
FileSystem

Initializes a new instance of the FileSystem class.

Properties

Name Description
CaseSensitive

Gets a value indicating whether the file system is case-sensitive.

Methods

Name Description
BeginResumableUploadAsync(string fileName, System.Threading.CancellationToken cancellationToken)

Starts a new resumable upload to the specified file name.

CancelResumableUploadAsync(string fileName, byte[] state, System.Threading.CancellationToken cancellationToken)

Cancels a resumable upload and deletes any partially uploaded data associated with it.

CompleteResumableUploadAsync(string fileName, byte[] state, System.Threading.CancellationToken cancellationToken)

Marks the end of a resumable upload. This is called after all of the chunks have been uploaded.

ContinueResumableUploadAsync(string fileName, byte[] state, System.Threading.CancellationToken cancellationToken)

Continues a previously started resumable upload to the specified file name.

CopyFileAsync(string sourceName, string targetName, bool overwrite)

Copies the specified file from sourceName to targetName.

CreateDirectoryAsync(string directoryName)

Creates the specified directory if it does not already exist.

CreateFileAsync(string fileName, FileAccessHints hints, System.Threading.CancellationToken cancellationToken)

Creates a new file with the specified path and returns a System.IO.Stream backed by it. The is overwritten if it already exists, and is only guaranteed to allow sequential write access.

DeleteDirectoryAsync(string directoryName, bool recursive)

Deletes the specified directory if it exists.

DeleteFileAsync(string fileName)

Deletes the specified file if it exists.

DirectoryExistsAsync(string directoryName)

Returns a value indicating whether the specified directory exists.

Dispose

Releases resources used by this instance.

Dispose(bool disposing)

Releases resources used by this instance.

FileExistsAsync(string fileName)

Returns a value indicating whether the specified file exists.

GetDescription

Returns the name of this storage mechanism and non-sensitive configuration information.

GetInfoAsync(string path)

Returns information about the specified file or directory if it exists; otherwise returns null (Nothing in Visual Basic).

ListContentsAsync(string path)

Returns a list of the items contained in the specified directory.

MoveFileAsync(string originalName, string newName)

Moves the specified file.

MoveFileAsync(string originalName, string newName, bool overwrite, System.Threading.CancellationToken cancellationToken)

Moves the specified file.

OpenReadAsync(string fileName, FileAccessHints hints, System.Threading.CancellationToken cancellationToken)

Returns a System.IO.Stream backed by the specified file. The file must exist, and is only guaranteed to allow sequential read access.