FileSystemExtensions

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

Provides extension methods for the file system classes.

public static class FileSystemExtensions

Methods

Copies an existing file/file version to a new file. Overwriting a file of the same name is allowed.

public void Copy(this IFileResourceLink source, this FileLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to copy.
FileLinkdestinationThe link to the destination file.
booloverwriteif the destination file can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing file/file version to a new file.

public void Copy(this IFileResourceLink source, this FileLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to copy.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing file/file version to a new file.

public void Copy(this IFileResourceLink source, this FileLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to copy.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing directory to a new directory. Overwriting a file of the same name is allowed.

public void Copy(this DirectoryLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to copy.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing directory to a new directory.

public void Copy(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing directory to a new directory.

public void Copy(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing file/file version to a new file. Overwriting a file of the same name is allowed.

public Task CopyAsync(this IFileResourceLink source, this FileLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to copy.
FileLinkdestinationThe link to the destination file.
booloverwriteif the destination file can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing file/file version to a new file.

public Task CopyAsync(this IFileResourceLink source, this FileLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to copy.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing file/file version to a new file.

public Task CopyAsync(this IFileResourceLink source, this FileLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to copy.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing directory to a new directory. Overwriting a file of the same name is allowed.

public Task CopyAsync(this DirectoryLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to copy.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing directory to a new directory.

public Task CopyAsync(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing directory to a new directory.

public Task CopyAsync(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing file/directory/file version to a new directory. Overwriting a file of the same name is allowed.

public FileSystemStructureLink CopyTo(this IFileSystemLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: FileSystemStructureLink

Parameters

TypeName
IFileSystemLinksourceThe link to the file/directory/file version to copy.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the file/directory/file version in the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing file/directory/file version to a new directory.

public FileSystemStructureLink CopyTo(this IFileSystemLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: FileSystemStructureLink

Parameters

TypeName
IFileSystemLinksourceThe link to the file/directory/file version to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Copies an existing file/directory/file version to a new directory.

public FileSystemStructureLink CopyTo(this IFileSystemLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: FileSystemStructureLink

Parameters

TypeName
IFileSystemLinksourceThe link to the file/directory/file version to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing file/directory/file version to a new directory. Overwriting a file of the same name is allowed.

public Task<FileSystemStructureLink> CopyToAsync(this IFileSystemLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
IFileSystemLinksourceThe link to the file/directory/file version to copy.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the file/directory/file version in the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing file/directory/file version to a new directory.

public Task<FileSystemStructureLink> CopyToAsync(this IFileSystemLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
IFileSystemLinksourceThe link to the file/directory/file version to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously copies an existing file/directory/file version to a new directory.

public Task<FileSystemStructureLink> CopyToAsync(this IFileSystemLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
IFileSystemLinksourceThe link to the file/directory/file version to copy.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified file to a new location, providing the option to specify a new file name. Overwriting a file of the same name is allowed.

public void Move(this FileLink source, this FileLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
FileLinksourceThe link to the file to move.
FileLinkdestinationThe link to the destination file.
booloverwriteif the destination file can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified file to a new location, providing the option to specify a new file name.

public void Move(this FileLink source, this FileLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
FileLinksourceThe link to the file to move.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified file to a new location, providing the option to specify a new file name

public void Move(this FileLink source, this FileLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
FileLinksourceThe link to the file to move.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified directory to a new location, providing the option to specify a new directory name. Overwriting a directory of the same name is allowed.

public void Move(this DirectoryLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to move.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified directory to a new location, providing the option to specify a new directory name.

public void Move(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified directory to a new location, providing the option to specify a new directory name.

public void Move(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified file to a new location, providing the option to specify a new file name. Overwriting a file of the same name is allowed.

public Task MoveAsync(this FileLink source, this FileLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
FileLinksourceThe link to the file to move.
FileLinkdestinationThe link to the destination file.
booloverwriteif the destination file can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified file to a new location, providing the option to specify a new file name.

public Task MoveAsync(this FileLink source, this FileLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
FileLinksourceThe link to the file to move.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified file to a new location, providing the option to specify a new file name.

public Task MoveAsync(this FileLink source, this FileLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
FileLinksourceThe link to the file to move.
FileLinkdestinationThe link to the destination file.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified directory to a new location, providing the option to specify a new directory name. Overwriting a directory of the same name is allowed.

public Task MoveAsync(this DirectoryLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to move.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified directory to a new location, providing the option to specify a new directory name.

public Task MoveAsync(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveMode
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified directory to a new location, providing the option to specify a new directory name.

public Task MoveAsync(this DirectoryLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflict
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified file/directory to a new location, providing the option to specify a new file name. Overwriting a file of the same name is allowed.

public FileSystemStructureLink MoveTo(this FileSystemStructureLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: FileSystemStructureLink

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to move.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the file/directory in the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified file/directory to a new directory, providing the option to specify a new file name.

public FileSystemStructureLink MoveTo(this FileSystemStructureLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: FileSystemStructureLink

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Moves a specified file/directory to a new directory, providing the option to specify a new file name.

public FileSystemStructureLink MoveTo(this FileSystemStructureLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: FileSystemStructureLink

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified file/directory to a new directory, providing the option to specify a new file name. Overwriting a file of the same name is allowed.

public Task<FileSystemStructureLink> MoveToAsync(this FileSystemStructureLink source, this DirectoryLink destination, this bool overwrite, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to move.
DirectoryLinkdestinationThe link to the destination directory.
booloverwriteif the file/directory in the destination directory can be overwritten; otherwise, .
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified file/directory to a new directory, providing the option to specify a new file name.

public Task<FileSystemStructureLink> MoveToAsync(this FileSystemStructureLink source, this DirectoryLink destination, this FileSystemConflictResolveMode conflictResolveMode, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveModeconflictResolveModeThe file system conflict resolve mode.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously moves a specified file/directory to a new directory, providing the option to specify a new file name.

public Task<FileSystemStructureLink> MoveToAsync(this FileSystemStructureLink source, this DirectoryLink destination, this FileSystemConflictResolveDelegate conflictResolver, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to move.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemConflictResolveDelegateconflictResolverThe delegate to resolve conflicts.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Opens a text file, reads all the text in the file into a string, and then closes the file.

public string ReadAllText(this IFileResourceLink source)

Result Type: string

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version.

Opens a file, reads all text in the file into a string with the specified encoding, and then closes the file.

public string ReadAllText(this IFileResourceLink source, this Encoding encoding)

Result Type: string

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version.
EncodingencodingThe encoding applied to the contents of the file.

Asynchronously opens a text file, reads all the text in the file into a string, and then closes the file.

public Task<string> ReadAllTextAsync(this IFileResourceLink source)

Result Type: Task<string>

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version.

Asynchronously opens a file, reads all text in the file into a string with the specified encoding, and then closes the file.

public Task<string> ReadAllTextAsync(this IFileResourceLink source, this Encoding encoding)

Result Type: Task<string>

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version.
EncodingencodingThe encoding applied to the contents of the file.

Renames a specified file/directory.

public FileSystemStructureLink Rename(this FileSystemStructureLink source, this string newName)

Result Type: FileSystemStructureLink

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to rename.
stringnewNameA containing a new name for .

Asynchronously renames a specified file/directory.

public Task<FileSystemStructureLink> RenameAsync(this FileSystemStructureLink source, this string newName)

Result Type: Task<FileSystemStructureLink>

Parameters

TypeName
FileSystemStructureLinksourceThe link to the file/directory to rename.
stringnewNameA containing a new name for .

Synchronize source directory with destination directory.

public void SyncWith(this DirectoryLink source, this DirectoryLink destination, this FileSystemSynchronizeMode mode, this FileLinkContentEqualityComparer comparer, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
DirectoryLinksourceThe link to the directory to synchronize.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemSynchronizeModemodeThe synchronization mode.
FileLinkContentEqualityComparercomparerThe delegate to compare two links to files/directories.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Synchronize source file/file version with destination file.

public void SyncWith(this IFileResourceLink source, this FileLink destination, this FileSystemSynchronizeMode mode, this FileLinkContentEqualityComparer comparer, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: void

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to synchronize.
FileLinkdestinationThe link to the destination file.
FileSystemSynchronizeModemodeThe synchronization mode.
FileLinkContentEqualityComparercomparerThe delegate to compare two links to files/directories.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously synchronize source directory with destination directory.

public Task SyncWithAsync(this DirectoryLink source, this DirectoryLink destination, this FileSystemSynchronizeMode mode, this FileLinkContentEqualityComparer comparer, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
DirectoryLinksourceThe link to the directory to synchronize.
DirectoryLinkdestinationThe link to the destination directory.
FileSystemSynchronizeModemodeThe synchronization mode.
FileLinkContentEqualityComparercomparerThe delegate to compare two links to files/directories.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Asynchronously synchronize source file/file version with destination file.

public Task SyncWithAsync(this IFileResourceLink source, this FileLink destination, this FileSystemSynchronizeMode mode, this FileLinkContentEqualityComparer comparer, this FileSystemExceptionResolveDelegate exceptionResolver)

Result Type: Task

Parameters

TypeName
IFileResourceLinksourceThe link to the file/file version to synchronize.
FileLinkdestinationThe link to the destination file.
FileSystemSynchronizeModemodeThe synchronization mode.
FileLinkContentEqualityComparercomparerThe delegate to compare two links to files/directories.
FileSystemExceptionResolveDelegateexceptionResolverThe delegate to resolve exceptions.

Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.

public void WriteAllText(this FileLink source, this string content)

Result Type: void

Parameters

TypeName
FileLinksourceThe link to the file.
stringcontentThe string to write to the file.

Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.

public void WriteAllText(this FileLink source, this string content, this Encoding encoding)

Result Type: void

Parameters

TypeName
FileLinksourceThe link to the file.
stringcontentThe string to write to the file.
EncodingencodingThe encoding to apply to the string.

Asynchronously creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.

public Task WriteAllTextAsync(this FileLink source, this string content)

Result Type: Task

Parameters

TypeName
FileLinksourceThe link to the file.
stringcontentThe string to write to the file.

Asynchronously creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.

public Task WriteAllTextAsync(this FileLink source, this string content, this Encoding encoding)

Result Type: Task

Parameters

TypeName
FileLinksourceThe link to the file.
stringcontentThe string to write to the file.
EncodingencodingThe encoding to apply to the string.