IFileSystemOperations

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

Provides an operations mechanism for TagBites.IO.FileSystem.

public abstract interface IFileSystemOperations : TagBites.IO.Operations.IFileSystemReadOperations

Methods

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

public IFileSystemStructureLinkInfo CreateDirectory(DirectoryLink directory)

Result Type: IFileSystemStructureLinkInfo

Parameters

TypeName
DirectoryLinkdirectoryA link to the directory being created.

Deletes a specified directory, and optionally any subdirectories.

public void DeleteDirectory(DirectoryLink directory, bool recursive)

Result Type: void

Parameters

TypeName
DirectoryLinkdirectoryThe handle for the directory being deleted.
boolrecursiveto remove directories, subdirectories, and files in path; otherwise, .

Deletes the specified file.

public void DeleteFile(FileLink file)

Result Type: void

Parameters

TypeName
FileLinkfileThe link to the file being deleted.

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

public IFileSystemStructureLinkInfo MoveDirectory(DirectoryLink source, DirectoryLink destination)

Result Type: IFileSystemStructureLinkInfo

Parameters

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

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

public IFileLinkInfo MoveFile(FileLink source, FileLink destination)

Result Type: IFileLinkInfo

Parameters

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

Updates a metadata information about the file/directory.

public IFileSystemStructureLinkInfo UpdateMetadata(FileSystemStructureLink link, IFileSystemLinkMetadata metadata)

Result Type: IFileSystemStructureLinkInfo

Parameters

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

Creates or overwrites a file in the specified handle.

public IFileLinkInfo WriteFile(FileLink file, Stream stream)

Result Type: IFileLinkInfo

Parameters

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