IFileSystemAsyncWriteOperations
Namespace: TagBites.IO.Operations
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0
Provides the asynchronous write operations of a FileSystem.
public interface IFileSystemAsyncWriteOperations : TagBites.IO.Operations.IFileSystemAsyncReadOperations, TagBites.IO.Operations.IFileSystemOperationsMethods
Section titled “Methods”CreateDirectoryAsync(DirectoryLink)
Section titled “CreateDirectoryAsync(DirectoryLink)”Asynchronously creates all directories and subdirectories in the specified path unless they already exist.
public virtual Task<IFileSystemStructureLinkInfo> CreateDirectoryAsync(DirectoryLink directory)Parameters
Section titled “Parameters”directoryDirectoryLink
A link to the directory being created.
Returns
Section titled “Returns”Task<IFileSystemStructureLinkInfo>
The task object representing the asynchronous operation. The value of the parameter contains the information about the link to the created directory.
DeleteDirectoryAsync(DirectoryLink, bool)
Section titled “DeleteDirectoryAsync(DirectoryLink, bool)”Asynchronously deletes a specified directory, and optionally any subdirectories.
public virtual Task DeleteDirectoryAsync(DirectoryLink directory, bool recursive)Parameters
Section titled “Parameters”directoryDirectoryLink
The handle for the directory being deleted.recursivebool
trueto remove the current directory, all its subdirectories; otherwise,false.
Returns
Section titled “Returns”The task object representing the asynchronous operation.
DeleteFileAsync(FileLink)
Section titled “DeleteFileAsync(FileLink)”Asynchronously deletes the specified file.
public virtual Task DeleteFileAsync(FileLink file)Parameters
Section titled “Parameters”fileFileLink
The link to the file being deleted.
Returns
Section titled “Returns”The task object representing the asynchronous operation.
MoveDirectoryAsync(DirectoryLink, DirectoryLink)
Section titled “MoveDirectoryAsync(DirectoryLink, DirectoryLink)”Asynchronously moves a specified directory and its contents to a new location.
public virtual Task<IFileSystemStructureLinkInfo> MoveDirectoryAsync(DirectoryLink source, DirectoryLink destination)Parameters
Section titled “Parameters”sourceDirectoryLink
The handle for the directory being moved.destinationDirectoryLink
The link to the new location of .
Returns
Section titled “Returns”Task<IFileSystemStructureLinkInfo>
The task object representing the asynchronous operation. The value of the parameter contains the information about the link to the moved directory.
MoveFileAsync(FileLink, FileLink, bool)
Section titled “MoveFileAsync(FileLink, FileLink, bool)”Asynchronously moves a specified file and its contents to a new location.
public virtual Task<IFileLinkInfo> MoveFileAsync(FileLink source, FileLink destination, bool overwrite)Parameters
Section titled “Parameters”sourceFileLink
The handle for the file being moved.destinationFileLink
The link to the new location of .overwritebool
trueif the file can be overwritten; otherwise, if the file exists, an exception will be thrown.
Returns
Section titled “Returns”The task object representing the asynchronous operation. The value of the parameter contains the information about the link to the moved file.
UpdateMetadataAsync(FileSystemStructureLink, IFileSystemLinkMetadata)
Section titled “UpdateMetadataAsync(FileSystemStructureLink, IFileSystemLinkMetadata)”Asynchronously updates a metadata information about the file/directory.
public virtual Task<IFileSystemStructureLinkInfo> UpdateMetadataAsync(FileSystemStructureLink link, IFileSystemLinkMetadata metadata)Parameters
Section titled “Parameters”linkFileSystemStructureLink
The handle for the directory or file to be updated.metadataIFileSystemLinkMetadata
The metadata of the directory or file.
Returns
Section titled “Returns”Task<IFileSystemStructureLinkInfo>
The task object representing the asynchronous operation. The value of the parameter contains the information about the link to the updated file/directory.
WriteFileAsync(FileLink, Stream, bool)
Section titled “WriteFileAsync(FileLink, Stream, bool)”Asynchronously creates or overwrites a file in the specified handle.
public virtual Task<IFileLinkInfo> WriteFileAsync(FileLink file, Stream stream, bool overwrite)Parameters
Section titled “Parameters”fileFileLink
The handle for the file being written.streamStream
The stream from which the contents is written to the file.overwritebool
trueif the file can be overwritten; otherwise, if the file exists, an exception will be thrown.
Returns
Section titled “Returns”The task object representing the asynchronous operation. The value of the parameter contains the information about the link to the created or overwritten file.