IFileSystemAsyncOperations

Namespace: TagBites.IO.Operations
Assembly: TagBites.IO.dll

Provides an asynchronous operations mechanism for TagBites.IO.FileSystem.

public abstract interface IFileSystemAsyncOperations : TagBites.IO.Operations.IFileSystemAsyncReadOperations

Methods

Asynchronously creates all directories and subdirectories in the specified path unless they already exist.

public Task<IFileSystemStructureLinkInfo> CreateDirectoryAsync(DirectoryLink directory)

Result Type: Task<IFileSystemStructureLinkInfo>

Parameters

TypeName
DirectoryLinkdirectoryA link to the directory being created.

Asynchronously deletes a specified directory, and optionally any subdirectories.

public Task DeleteDirectoryAsync(DirectoryLink directory, bool recursive)

Result Type: Task

Parameters

TypeName
DirectoryLinkdirectoryThe handle for the directory being deleted.
boolrecursiveto remove the current directory, all its subdirectories; otherwise, .

Asynchronously deletes the specified file.

public Task DeleteFileAsync(FileLink file)

Result Type: Task

Parameters

TypeName
FileLinkfileThe link to the file being deleted.

Asynchronously moves a specified directory and its contents to a new location.

public Task<IFileSystemStructureLinkInfo> MoveDirectoryAsync(DirectoryLink source, DirectoryLink destination)

Result Type: Task<IFileSystemStructureLinkInfo>

Parameters

TypeName
DirectoryLinksourceThe handle for the directory being moved.
DirectoryLinkdestinationThe link to the new location of .

Asynchronously moves a specified file and its contents to a new location.

public Task<IFileLinkInfo> MoveFileAsync(FileLink source, FileLink destination)

Result Type: Task<IFileLinkInfo>

Parameters

TypeName
FileLinksourceThe handle for the file being moved.
FileLinkdestinationThe link to the new location of .

Asynchronously updates a metadata information about the file/directory.

public Task<IFileSystemStructureLinkInfo> UpdateMetadataAsync(FileSystemStructureLink link, IFileSystemLinkMetadata metadata)

Result Type: Task<IFileSystemStructureLinkInfo>

Parameters

TypeName
FileSystemStructureLinklinkThe handle for the directory or file to be updated.
IFileSystemLinkMetadatametadataThe metadata of the directory or file.

Asynchronously creates or overwrites a file in the specified handle.

public Task<IFileLinkInfo> WriteFileAsync(FileLink file, Stream stream)

Result Type: Task<IFileLinkInfo>

Parameters

TypeName
FileLinkfileThe handle for the file being written.
StreamstreamThe stream from which the contents is written to the file.