FileVersionLink

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

Provides a mechanism for linking to the file version. This class cannot be inherited.

public sealed class FileVersionLink : TagBites.IO.IFileResourceLink, TagBites.IO.IFileSystemLink

Properties

Gets a value indicating whether the file version can be read.

public bool CanRead { get; }

Result Type: bool

Gets a value indicating whether the file version can be written.

public bool CanWrite { get; }

Result Type: bool

Gets a string representing the path to the content of the file version.

public string ContentPath { get; }

Result Type: string

Gets the creation time of the file version. <returns>The creation time of the file version.</returns>

public DateTime CreationTime { get; }

Result Type: DateTime

Gets a value indicating whether the file version exists.

public bool Exists { get; }

Result Type: bool

Gets the extension part of the file version. <returns>A string containing the the extension part of the file version.</returns>

public string Extension { get; }

Result Type: string

public FileSystem FileSystem { get; }

Result Type: FileSystem

Gets the full path of the file version. <returns>A System.String containing the full path of the file version.</returns>

public string FullName { get; }

Result Type: string

Gets the hash value for the file version. <returns>A TagBites.IO.FileHash object representing hash value for the file version.</returns>

public FileHash Hash { get; }

Result Type: FileHash

Gets information about file version. <returns>A TagBites.IO.IFileVersionLinkInfo object representing information about a file version.</returns>

public IFileVersionLinkInfo Info { get; }

Result Type: IFileVersionLinkInfo

Gets a value indicating whether the file version is read only. <returns><see langword="true" /> if the file version is read only; otherwise, <see langword="false" />.</returns>

public bool IsReadOnly { get; }

Result Type: bool

Gets the size, in bytes, of the file version.

public long Length { get; }

Result Type: long

Gets the time when the current file version was last modified.

public DateTime ModifyTime { get; }

Result Type: DateTime

Gets the name of the file version.

public string Name { get; }

Result Type: string

Gets the name without extension part of the file version. <returns>A string containing the name without extension part of the file version.</returns>

public string NameWithoutExtension { get; }

Result Type: string

Gets the link to the source file. <returns>A TagBites.IO.FileLink object representing the link to the source file.</returns>

public FileLink Source { get; }

Result Type: FileLink

public FileSystemLinkType Type { get; }

Result Type: FileSystemLinkType

Methods

Creates a file version.

public void Create(Stream stream)

Result Type: void

Parameters

TypeName
StreamstreamThe stream to which the contents of the current file version will be written.

Asynchronously creates a file version.

public Task CreateAsync(Stream stream)

Result Type: Task

Parameters

TypeName
StreamstreamThe stream to which the contents of the current file version will be written.

Deletes the file version.

public void Delete()

Result Type: void

Asynchronously deletes the file version.

public Task DeleteAsync()

Result Type: Task

Demands a read access to the file version.

public void DemandReadAccess()

Result Type: void

Demands a write access to the file version.

public void DemandWriteAccess()

Result Type: void

public bool Equals(object obj)

Result Type: bool

Parameters

TypeName
objectobj
public int GetHashCode()

Result Type: int

Returns a value indicating whether the file version has equal content to other file/file version.

public bool HasEqualContent(IFileResourceLink other)

Result Type: bool

Parameters

TypeName
IFileResourceLinkotherThe link to the file/file version to compare.

Asynchronously returns a value indicating whether the file version has equal content to other file/file version.

public Task<bool> HasEqualContentAsync(IFileResourceLink other)

Result Type: Task<bool>

Parameters

TypeName
IFileResourceLinkotherThe link to the file/file version to compare.

Determines whether the specified TagBites.IO.FileVersionLink instances are considered equal.

public bool op_Equality(FileVersionLink left, FileVersionLink right)

Result Type: bool

Parameters

TypeName
FileVersionLinkleftThe first object to compare.
FileVersionLinkrightThe second object to compare.

Determines whether the specified TagBites.IO.FileVersionLink instances are considered different.

public bool op_Inequality(FileVersionLink left, FileVersionLink right)

Result Type: bool

Parameters

TypeName
FileVersionLinkleftThe first object to compare.
FileVersionLinkrightThe second object to compare.

Reads the file version.

public Stream Read()

Result Type: Stream

Asynchronously reads the file version.

public Task<Stream> ReadAsync()

Result Type: Task<Stream>

Refreshes the state of the file version.

public void Refresh()

Result Type: void

Restores the file version.

public void Restore()

Result Type: void

Asynchronously restores the file version.

public Task RestoreAsync()

Result Type: Task

public string ToString()

Result Type: string