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
CreateDirectoryAsync(DirectoryLink)
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
Type | Name | |
---|---|---|
DirectoryLink | directory | A link to the directory being created. |
DeleteDirectoryAsync(DirectoryLink, bool)
Asynchronously deletes a specified directory, and optionally any subdirectories.
public Task DeleteDirectoryAsync(DirectoryLink directory, bool recursive)
Result Type: Task
Parameters
Type | Name | |
---|---|---|
DirectoryLink | directory | The handle for the directory being deleted. |
bool | recursive | to remove the current directory, all its subdirectories; otherwise, . |
DeleteFileAsync(FileLink)
Asynchronously deletes the specified file.
public Task DeleteFileAsync(FileLink file)
Result Type: Task
Parameters
Type | Name | |
---|---|---|
FileLink | file | The link to the file being deleted. |
MoveDirectoryAsync(DirectoryLink, DirectoryLink)
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
Type | Name | |
---|---|---|
DirectoryLink | source | The handle for the directory being moved. |
DirectoryLink | destination | The link to the new location of . |
MoveFileAsync(FileLink, FileLink)
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
Type | Name | |
---|---|---|
FileLink | source | The handle for the file being moved. |
FileLink | destination | The link to the new location of . |
UpdateMetadataAsync(FileSystemStructureLink, IFileSystemLinkMetadata)
Asynchronously updates a metadata information about the file/directory.
public Task<IFileSystemStructureLinkInfo> UpdateMetadataAsync(FileSystemStructureLink link, IFileSystemLinkMetadata metadata)
Result Type: Task<IFileSystemStructureLinkInfo>
Parameters
Type | Name | |
---|---|---|
FileSystemStructureLink | link | The handle for the directory or file to be updated. |
IFileSystemLinkMetadata | metadata | The metadata of the directory or file. |
WriteFileAsync(FileLink, Stream)
Asynchronously creates or overwrites a file in the specified handle.
public Task<IFileLinkInfo> WriteFileAsync(FileLink file, Stream stream)
Result Type: Task<IFileLinkInfo>
Parameters
Type | Name | |
---|---|---|
FileLink | file | The handle for the file being written. |
Stream | stream | The stream from which the contents is written to the file. |