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.IFileSystemLinkInheritance: object → FileSystemStructureLink
Derived:
Constructors
Section titled “Constructors”FileSystemStructureLink(FileSystem, string)
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)Parameters
Section titled “Parameters”fileSystemFileSystem
The file system to which the created object belongs.fullNamestring
The full path of the directory or file.
FileSystemStructureLink(FileSystem, IFileSystemStructureLinkInfo)
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)Parameters
Section titled “Parameters”fileSystemFileSystem
The file system with which the created object will be associated.infoIFileSystemStructureLinkInfo
The information about a file/directory.
Properties
Section titled “Properties”Gets a container to store user’s metadata.
public virtual FileSystemLinkBag Bag { get; }Property Value
Section titled “Property Value”CanRead
Section titled “CanRead”Gets a value indicating whether the file/directory can be read.
public virtual bool CanRead { get; }Property Value
Section titled “Property Value”true if the file/directory can be read; otherwise, false.
CanWrite
Section titled “CanWrite”Gets a value indicating whether the file/directory can be written.
public virtual bool CanWrite { get; }Property Value
Section titled “Property Value”true if the file/directory can be written; otherwise, false.
CreationTime
Section titled “CreationTime”Gets the creation time of the file/directory.
public virtual DateTime? CreationTime { get; }Property Value
Section titled “Property Value”The creation time of the file/directory.
Exists
Section titled “Exists”Gets a value indicating whether the file/directory exists.
public virtual bool Exists { get; }Property Value
Section titled “Property Value”true if the file/directory exists; otherwise, false.
ExistsAsDifferentResource
Section titled “ExistsAsDifferentResource”Gets a value indicating whether the current link exists is different file system link.
public bool ExistsAsDifferentResource { get; }Property Value
Section titled “Property Value”true if the current link exists is different file system link; otherwise, false.
FileSystem
Section titled “FileSystem”Gets a file system to which the file/directory/file version belongs.
public virtual FileSystem FileSystem { get; }Property Value
Section titled “Property Value”A FileSystem object representing file system to which the file/directory/file version belongs.
FullName
Section titled “FullName”Gets the full path of the file/directory.
public virtual string FullName { get; }Property Value
Section titled “Property Value”A String containing the full path of the file/directory.
Gets information about file/directory.
public IFileSystemStructureLinkInfo Info { get; }Property Value
Section titled “Property Value”A IFileSystemStructureLinkInfo object representing information about a file/directory.
IsHidden
Section titled “IsHidden”Gets a value indicating whether the file/directory is hidden.
public bool IsHidden { get; }Property Value
Section titled “Property Value”IsReadOnly
Section titled “IsReadOnly”Gets a value indicating whether the file/directory is read only.
public virtual bool IsReadOnly { get; }Property Value
Section titled “Property Value”true if the file/directory is read only; otherwise, false.
ModifyTime
Section titled “ModifyTime”Gets the time when the current file/directory was last modified.
public virtual DateTime? ModifyTime { get; }Property Value
Section titled “Property Value”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; }Property Value
Section titled “Property Value”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.
Parent
Section titled “Parent”Gets a link to a directory being parent of file/directory associated with current link.
public DirectoryLink Parent { get; }Property Value
Section titled “Property Value”A DirectoryLink object representing a directory being parent of file/directory associated with current link.
ParentFullName
Section titled “ParentFullName”Gets a full name of a directory being parent of file/directory associated with current link.
public string ParentFullName { get; }Property Value
Section titled “Property Value”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; }Property Value
Section titled “Property Value”A FileSystemLinkType value defines whether the link is associated with file, directory or file version.
Methods
Section titled “Methods”CreateWatcher()
Section titled “CreateWatcher()”Creates a watcher for file/directory associated with link.
public IFileSystemLinkWatcher CreateWatcher()Returns
Section titled “Returns”A IFileSystemLinkWatcher object for listening to a file/directory change notifications and raises events when a file changes.
Delete()
Section titled “Delete()”Deletes the file/directory.
public virtual void Delete()DeleteAsync()
Section titled “DeleteAsync()”Asynchronously deletes the file/directory.
public virtual Task DeleteAsync()Returns
Section titled “Returns”The task object representing the asynchronous operation.
DemandReadAccess()
Section titled “DemandReadAccess()”Demands a read access to the file/directory.
public virtual void DemandReadAccess()DemandWriteAccess()
Section titled “DemandWriteAccess()”Demands a read access to the file/directory.
public void DemandWriteAccess()Equals(object)
Section titled “Equals(object)”public virtual bool Equals(object obj)Parameters
Section titled “Parameters”objobject
Returns
Section titled “Returns”GetHashCode()
Section titled “GetHashCode()”public virtual int GetHashCode()Returns
Section titled “Returns”GetRelativeNameTo(DirectoryLink)
Section titled “GetRelativeNameTo(DirectoryLink)”Retrieves a relative name of directory associated with specified link.
public string GetRelativeNameTo(DirectoryLink parent)Parameters
Section titled “Parameters”parentDirectoryLink
The link to the directory
Returns
Section titled “Returns”A String containing a relative name of directory associated with specified link.
IsParentOf(FileSystemStructureLink)
Section titled “IsParentOf(FileSystemStructureLink)”Gets a value indicating whether the current instance is parent of thelink.
public bool IsParentOf(FileSystemStructureLink link)Parameters
Section titled “Parameters”linkFileSystemStructureLink
The other link to a file/directory.
Returns
Section titled “Returns”true if the current instance is parent of thelink; otherwise, false.
LoadInfo()
Section titled “LoadInfo()”Loads information (like Exists, ModifyTime, etc.) about file/directory if its not loaded already.
public virtual void LoadInfo()LoadInfoAsync()
Section titled “LoadInfoAsync()”Loads information (like Exists, ModifyTime, etc.) about file/directory if its not loaded already.
public virtual Task LoadInfoAsync()Returns
Section titled “Returns”RefreshInfo()
Section titled “RefreshInfo()”Refreshes information (like Exists, ModifyTime, etc.) about file/directory.
public virtual void RefreshInfo()RefreshInfoAsync()
Section titled “RefreshInfoAsync()”Refreshes information (like Exists, ModifyTime, etc.) about file/directory.
public virtual Task RefreshInfoAsync()Returns
Section titled “Returns”ToString()
Section titled “ToString()”public virtual string ToString()Returns
Section titled “Returns”UpdateMetadata(IFileSystemLinkMetadata)
Section titled “UpdateMetadata(IFileSystemLinkMetadata)”Updates a metadata information about the file/directory.
public void UpdateMetadata(IFileSystemLinkMetadata metadata)Parameters
Section titled “Parameters”metadataIFileSystemLinkMetadata
The metadata of the directory or file.
UpdateMetadataAsync(IFileSystemLinkMetadata)
Section titled “UpdateMetadataAsync(IFileSystemLinkMetadata)”Asynchronously updates a metadata information about the file/directory.
public Task UpdateMetadataAsync(IFileSystemLinkMetadata metadata)Parameters
Section titled “Parameters”metadataIFileSystemLinkMetadata
The metadata of the directory or file.
Returns
Section titled “Returns”The task object representing the asynchronous operation.
operator ==(FileSystemStructureLink, FileSystemStructureLink)
Section titled “operator ==(FileSystemStructureLink, FileSystemStructureLink)”Determines whether the specified FileSystemStructureLink instances are considered equal.
public static bool operator ==(FileSystemStructureLink left, FileSystemStructureLink right)Parameters
Section titled “Parameters”leftFileSystemStructureLink
The first FileSystemStructureLink object to compare.rightFileSystemStructureLink
The second FileSystemStructureLink object to compare.
Returns
Section titled “Returns”true if the FileSystemStructureLink objects are considered equal; otherwise, false.
operator !=(FileSystemStructureLink, FileSystemStructureLink)
Section titled “operator !=(FileSystemStructureLink, FileSystemStructureLink)”Determines whether the specified FileSystemStructureLink instances are considered different.
public static bool operator !=(FileSystemStructureLink left, FileSystemStructureLink right)Parameters
Section titled “Parameters”leftFileSystemStructureLink
The first FileSystemStructureLink object to compare.rightFileSystemStructureLink
The second FileSystemStructureLink object to compare.
Returns
Section titled “Returns”true if the FileSystemStructureLink objects are considered different; otherwise, false.