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
CanRead
Gets a value indicating whether the file version can be read.
public bool CanRead { get; }
Result Type: bool
CanWrite
Gets a value indicating whether the file version can be written.
public bool CanWrite { get; }
Result Type: bool
ContentPath
Gets a string representing the path to the content of the file version.
public string ContentPath { get; }
Result Type: string
CreationTime
Gets the creation time of the file version. <returns>The creation time of the file version.</returns>
public DateTime CreationTime { get; }
Result Type: DateTime
Exists
Gets a value indicating whether the file version exists.
public bool Exists { get; }
Result Type: bool
Extension
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
FileSystem
public FileSystem FileSystem { get; }
Result Type: FileSystem
FullName
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
Hash
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
Info
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
IsReadOnly
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
Length
Gets the size, in bytes, of the file version.
public long Length { get; }
Result Type: long
ModifyTime
Gets the time when the current file version was last modified.
public DateTime ModifyTime { get; }
Result Type: DateTime
Name
Gets the name of the file version.
public string Name { get; }
Result Type: string
NameWithoutExtension
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
Source
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
Type
public FileSystemLinkType Type { get; }
Result Type: FileSystemLinkType
Methods
Create(Stream)
Creates a file version.
public void Create(Stream stream)
Result Type: void
Parameters
Type | Name | |
---|---|---|
Stream | stream | The stream to which the contents of the current file version will be written. |
CreateAsync(Stream)
Asynchronously creates a file version.
public Task CreateAsync(Stream stream)
Result Type: Task
Parameters
Type | Name | |
---|---|---|
Stream | stream | The stream to which the contents of the current file version will be written. |
Delete()
Deletes the file version.
public void Delete()
Result Type: void
DeleteAsync()
Asynchronously deletes the file version.
public Task DeleteAsync()
Result Type: Task
DemandReadAccess()
Demands a read access to the file version.
public void DemandReadAccess()
Result Type: void
DemandWriteAccess()
Demands a write access to the file version.
public void DemandWriteAccess()
Result Type: void
Equals(object)
public bool Equals(object obj)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
object | obj |
GetHashCode()
public int GetHashCode()
Result Type: int
HasEqualContent(IFileResourceLink)
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
Type | Name | |
---|---|---|
IFileResourceLink | other | The link to the file/file version to compare. |
HasEqualContentAsync(IFileResourceLink)
Asynchronously returns a value indicating whether the file version has equal content to other file/file version.
public Task<bool> HasEqualContentAsync(IFileResourceLink other)
Parameters
Type | Name | |
---|---|---|
IFileResourceLink | other | The link to the file/file version to compare. |
op_Equality(FileVersionLink, FileVersionLink)
Determines whether the specified TagBites.IO.FileVersionLink instances are considered equal.
public bool op_Equality(FileVersionLink left, FileVersionLink right)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
FileVersionLink | left | The first object to compare. |
FileVersionLink | right | The second object to compare. |
op_Inequality(FileVersionLink, FileVersionLink)
Determines whether the specified TagBites.IO.FileVersionLink instances are considered different.
public bool op_Inequality(FileVersionLink left, FileVersionLink right)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
FileVersionLink | left | The first object to compare. |
FileVersionLink | right | The second object to compare. |
Read()
Reads the file version.
public Stream Read()
Result Type: Stream
ReadAsync()
Asynchronously reads the file version.
public Task<Stream> ReadAsync()
Refresh()
Refreshes the state of the file version.
public void Refresh()
Result Type: void
Restore()
Restores the file version.
public void Restore()
Result Type: void
RestoreAsync()
Asynchronously restores the file version.
public Task RestoreAsync()
Result Type: Task
ToString()
public string ToString()
Result Type: string