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
CreateDirectory(DirectoryLink)
Creates all directories and subdirectories in the specified path unless they already exist.
public IFileSystemStructureLinkInfo CreateDirectory(DirectoryLink directory)
Result Type: IFileSystemStructureLinkInfo
Parameters
Type | Name | |
---|---|---|
DirectoryLink | directory | A link to the directory being created. |
DeleteDirectory(DirectoryLink, bool)
Deletes a specified directory, and optionally any subdirectories.
public void DeleteDirectory(DirectoryLink directory, bool recursive)
Result Type: void
Parameters
Type | Name | |
---|---|---|
DirectoryLink | directory | The handle for the directory being deleted. |
bool | recursive | to remove directories, subdirectories, and files in path; otherwise, . |
DeleteFile(FileLink)
Deletes the specified file.
public void DeleteFile(FileLink file)
Result Type: void
Parameters
Type | Name | |
---|---|---|
FileLink | file | The link to the file being deleted. |
MoveDirectory(DirectoryLink, DirectoryLink)
Moves a specified directory and its contents to a new location.
public IFileSystemStructureLinkInfo MoveDirectory(DirectoryLink source, DirectoryLink destination)
Result Type: IFileSystemStructureLinkInfo
Parameters
Type | Name | |
---|---|---|
DirectoryLink | source | The handle for the directory being moved. |
DirectoryLink | destination | The link to the new location of . |
MoveFile(FileLink, FileLink)
Moves a specified file and its contents to a new location.
public IFileLinkInfo MoveFile(FileLink source, FileLink destination)
Result Type: IFileLinkInfo
Parameters
Type | Name | |
---|---|---|
FileLink | source | The handle for the file being moved. |
FileLink | destination | The link to the new location of . |
UpdateMetadata(FileSystemStructureLink, IFileSystemLinkMetadata)
Updates a metadata information about the file/directory.
public IFileSystemStructureLinkInfo UpdateMetadata(FileSystemStructureLink link, IFileSystemLinkMetadata metadata)
Result Type: 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. |
WriteFile(FileLink, Stream)
Creates or overwrites a file in the specified handle.
public IFileLinkInfo WriteFile(FileLink file, Stream stream)
Result Type: 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. |