IFileSystemWriteOperations
Namespace: TagBites.IO.Operations
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0
Provides the write operations of a FileSystem.
public interface IFileSystemWriteOperations : TagBites.IO.Operations.IFileSystemReadOperations, TagBites.IO.Operations.IFileSystemOperationsMethods
Section titled “Methods”CreateDirectory(DirectoryLink)
Section titled “CreateDirectory(DirectoryLink)”Creates all directories and subdirectories in the specified path unless they already exist.
public virtual IFileSystemStructureLinkInfo CreateDirectory(DirectoryLink directory)Parameters
Section titled “Parameters”directoryDirectoryLink
A link to the directory being created.
Returns
Section titled “Returns”A IFileSystemStructureLinkInfo object representing information about the link to the created directory.
DeleteDirectory(DirectoryLink, bool)
Section titled “DeleteDirectory(DirectoryLink, bool)”Deletes a specified directory, and optionally any subdirectories.
public virtual void DeleteDirectory(DirectoryLink directory, bool recursive)Parameters
Section titled “Parameters”directoryDirectoryLink
The handle for the directory being deleted.recursivebool
trueto remove directories, subdirectories, and files in the path; otherwise,false.
DeleteFile(FileLink)
Section titled “DeleteFile(FileLink)”Deletes the specified file.
public virtual void DeleteFile(FileLink file)Parameters
Section titled “Parameters”fileFileLink
The link to the file being deleted.
MoveDirectory(DirectoryLink, DirectoryLink)
Section titled “MoveDirectory(DirectoryLink, DirectoryLink)”Moves a specified directory and its contents to a new location.
public virtual IFileSystemStructureLinkInfo MoveDirectory(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”A IFileSystemStructureLinkInfo object representing information about the link to the moved directory.
MoveFile(FileLink, FileLink, bool)
Section titled “MoveFile(FileLink, FileLink, bool)”Moves a specified file and its contents to a new location.
public virtual IFileLinkInfo MoveFile(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”A IFileLinkInfo object representing information about the link to the moved file.
UpdateMetadata(FileSystemStructureLink, IFileSystemLinkMetadata)
Section titled “UpdateMetadata(FileSystemStructureLink, IFileSystemLinkMetadata)”Updates a metadata information about the file/directory.
public virtual IFileSystemStructureLinkInfo UpdateMetadata(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”A IFileSystemStructureLinkInfo object representing information about the link to the updated file/directory.
WriteFile(FileLink, Stream, bool)
Section titled “WriteFile(FileLink, Stream, bool)”Creates or overwrites a file in the specified handle.
public virtual IFileLinkInfo WriteFile(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”A IFileLinkInfo object representing information about the link to the created or overwritten file.