Skip to content
Auto
Products

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.IFileSystemOperations

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

public virtual IFileSystemStructureLinkInfo CreateDirectory(DirectoryLink directory)

IFileSystemStructureLinkInfo

A IFileSystemStructureLinkInfo object representing information about the link to the created directory.

Deletes a specified directory, and optionally any subdirectories.

public virtual void DeleteDirectory(DirectoryLink directory, bool recursive)
  • directory DirectoryLink
    The handle for the directory being deleted.
  • recursive bool
    true to remove directories, subdirectories, and files in the path; otherwise, false.

Deletes the specified file.

public virtual void DeleteFile(FileLink file)
  • file FileLink
    The link to the file being deleted.
Section titled “MoveDirectory(DirectoryLink, DirectoryLink)”

Moves a specified directory and its contents to a new location.

public virtual IFileSystemStructureLinkInfo MoveDirectory(DirectoryLink source, DirectoryLink destination)

IFileSystemStructureLinkInfo

A IFileSystemStructureLinkInfo object representing information about the link to the moved directory.

Moves a specified file and its contents to a new location.

public virtual IFileLinkInfo MoveFile(FileLink source, FileLink destination, bool overwrite)
  • source FileLink
    The handle for the file being moved.
  • destination FileLink
    The link to the new location of .
  • overwrite bool
    true if the file can be overwritten; otherwise, if the file exists, an exception will be thrown.

IFileLinkInfo

A IFileLinkInfo object representing information about the link to the moved file.

Section titled “UpdateMetadata(FileSystemStructureLink, IFileSystemLinkMetadata)”

Updates a metadata information about the file/directory.

public virtual IFileSystemStructureLinkInfo UpdateMetadata(FileSystemStructureLink link, IFileSystemLinkMetadata metadata)

IFileSystemStructureLinkInfo

A IFileSystemStructureLinkInfo object representing information about the link to the updated file/directory.

Creates or overwrites a file in the specified handle.

public virtual IFileLinkInfo WriteFile(FileLink file, Stream stream, bool overwrite)
  • file FileLink
    The handle for the file being written.
  • stream Stream
    The stream from which the contents is written to the file.
  • overwrite bool
    true if the file can be overwritten; otherwise, if the file exists, an exception will be thrown.

IFileLinkInfo

A IFileLinkInfo object representing information about the link to the created or overwritten file.