Skip to content
Auto
Products

FileSystemStructureLink

Namespace: TagBites.IO
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0

Provides the base class for both DirectoryLink and FileLink objects.

public abstract class FileSystemStructureLink : TagBites.IO.IFileSystemLink

Inheritance: object → FileSystemStructureLink

Derived:

Section titled “FileSystemStructureLink(FileSystem, string)”

Initializes a new instance of the FileSystemStructureLink class for a specified file system and full name.

protected FileSystemStructureLink(FileSystem fileSystem, string fullName)
  • fileSystem FileSystem
    The file system to which the created object belongs.
  • fullName string
    The full path of the directory or file.
Section titled “FileSystemStructureLink(FileSystem, IFileSystemStructureLinkInfo)”

Initializes a new instance of the FileSystemStructureLink class for a specified file system using the specified information.

protected FileSystemStructureLink(FileSystem fileSystem, IFileSystemStructureLinkInfo info)

Gets a container to store user’s metadata.

public virtual FileSystemLinkBag Bag { get; }

FileSystemLinkBag

Gets a value indicating whether the file/directory can be read.

public virtual bool CanRead { get; }

bool

true if the file/directory can be read; otherwise, false.

Gets a value indicating whether the file/directory can be written.

public virtual bool CanWrite { get; }

bool

true if the file/directory can be written; otherwise, false.

Gets the creation time of the file/directory.

public virtual DateTime? CreationTime { get; }

DateTime?

The creation time of the file/directory.

Gets a value indicating whether the file/directory exists.

public virtual bool Exists { get; }

bool

true if the file/directory exists; otherwise, false.

Gets a value indicating whether the current link exists is different file system link.

public bool ExistsAsDifferentResource { get; }

bool

true if the current link exists is different file system link; otherwise, false.

Gets a file system to which the file/directory/file version belongs.

public virtual FileSystem FileSystem { get; }

FileSystem

A FileSystem object representing file system to which the file/directory/file version belongs.

Gets the full path of the file/directory.

public virtual string FullName { get; }

string

A String containing the full path of the file/directory.

Gets information about file/directory.

public IFileSystemStructureLinkInfo Info { get; }

IFileSystemStructureLinkInfo

A IFileSystemStructureLinkInfo object representing information about a file/directory.

Gets a value indicating whether the file/directory is hidden.

public bool IsHidden { get; }

bool

Gets a value indicating whether the file/directory is read only.

public virtual bool IsReadOnly { get; }

bool

true if the file/directory is read only; otherwise, false.

Gets the time when the current file/directory was last modified.

public virtual DateTime? ModifyTime { get; }

DateTime?

The time the current file/directory was last modified.

For files, gets the name of the file. For directories, gets the name of the last directory in the hierarchy if a hierarchy exists. Otherwise, the Name property gets the name of the directory.

public virtual string Name { get; }

string

A String that is the name of the parent directory, the name of the last directory in the hierarchy, or the name of a file., including the file name extension.

Gets a link to a directory being parent of file/directory associated with current link.

public DirectoryLink Parent { get; }

DirectoryLink

A DirectoryLink object representing a directory being parent of file/directory associated with current link.

Gets a full name of a directory being parent of file/directory associated with current link.

public string ParentFullName { get; }

string

A String representing a full name of a directory being parent of file/directory associated with current link.

Gets the type of file system link.

public virtual FileSystemLinkType Type { get; }

FileSystemLinkType

A FileSystemLinkType value defines whether the link is associated with file, directory or file version.

Creates a watcher for file/directory associated with link.

public IFileSystemLinkWatcher CreateWatcher()

IFileSystemLinkWatcher

A IFileSystemLinkWatcher object for listening to a file/directory change notifications and raises events when a file changes.

Deletes the file/directory.

public virtual void Delete()

Asynchronously deletes the file/directory.

public virtual Task DeleteAsync()

Task

The task object representing the asynchronous operation.

Demands a read access to the file/directory.

public virtual void DemandReadAccess()

Demands a read access to the file/directory.

public void DemandWriteAccess()
public virtual bool Equals(object obj)

bool

public virtual int GetHashCode()

int

Retrieves a relative name of directory associated with specified link.

public string GetRelativeNameTo(DirectoryLink parent)

string

A String containing a relative name of directory associated with specified link.

Gets a value indicating whether the current instance is parent of thelink.

public bool IsParentOf(FileSystemStructureLink link)

bool

true if the current instance is parent of thelink; otherwise, false.

Loads information (like Exists, ModifyTime, etc.) about file/directory if its not loaded already.

public virtual void LoadInfo()

Loads information (like Exists, ModifyTime, etc.) about file/directory if its not loaded already.

public virtual Task LoadInfoAsync()

Task

Refreshes information (like Exists, ModifyTime, etc.) about file/directory.

public virtual void RefreshInfo()

Refreshes information (like Exists, ModifyTime, etc.) about file/directory.

public virtual Task RefreshInfoAsync()

Task

public virtual string ToString()

string

Updates a metadata information about the file/directory.

public void UpdateMetadata(IFileSystemLinkMetadata metadata)
Section titled “UpdateMetadataAsync(IFileSystemLinkMetadata)”

Asynchronously updates a metadata information about the file/directory.

public Task UpdateMetadataAsync(IFileSystemLinkMetadata metadata)

Task

The task object representing the asynchronous operation.

Section titled “operator ==(FileSystemStructureLink, FileSystemStructureLink)”

Determines whether the specified FileSystemStructureLink instances are considered equal.

public static bool operator ==(FileSystemStructureLink left, FileSystemStructureLink right)

bool

true if the FileSystemStructureLink objects are considered equal; otherwise, false.

Section titled “operator !=(FileSystemStructureLink, FileSystemStructureLink)”

Determines whether the specified FileSystemStructureLink instances are considered different.

public static bool operator !=(FileSystemStructureLink left, FileSystemStructureLink right)

bool

true if the FileSystemStructureLink objects are considered different; otherwise, false.