DirectoryNode Class
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9048)
Represents a directory (folder) in the file system.
Syntax
public class DirectoryNode : NodeBase, IEnumerable<NodeBase>, IEnumerable
Inherited Members
Constructors
Name | Description |
---|---|
DirectoryNode(String, DirectoryNode, NodeTimeInfo, NodeAttributes) | Initializes a new instance of DirectoryNode. |
Properties
Name | Description |
---|---|
Attributes | Gets attributes of the node. Implementation of the property calls FileSystemProvider methods, therefore repeated consecutive calls of the property can be expensive. Consider storing the value of the property in a local variable. Inherited from NodeBase. |
Context | Gets or sets user-defined object. Inherited from NodeBase. |
Extension | Gets the extension of the node. If the node does not have extension, then returs empty string. Name = myfile.txt. Extension returns 'txt' (without quotes).
Name = myDirectory. Extension returns empty string. Inherited from NodeBase. |
IsDeleted | Returns true if the node is deleted (does not exist in the file system), otherwise false. Implementation of the property calls FileSystemProvider methods, therefore repeated consecutive calls of the property can be expensive. Consider storing the value of the property in a local variable. Inherited from NodeBase. |
IsDirectory | Returns true if the current node is DirectoryNode, otherwise returns false. Inherited from NodeBase. |
IsFile | Returns true if the current node is FileNode, otherwise returns false. Inherited from NodeBase. |
IsRootDirectory | Returns true if the current node is root DirectoryNode (node with Path equal to '/'), otherwise returns false. Inherited from NodeBase. |
Length | Gets the length of the content returned by the method GetContent(NodeContentParameters). Inherited from NodeBase. |
Name | Gets the name of the node. Inherited from NodeBase. |
NodeType | Gets the type of the node.
NodeType.File for files.
NodeType.Directory for directories. |
Parent | Gets the parent directory of the node. For the root directory returns null. Inherited from NodeBase. |
Path | Full path of the node. Inherited from NodeBase. |
TimeInfo | Gets the time info of the node. CreationTime. AccessTime. LastWriteTime. Concrete file system providers are responsible for the correctness and validity of the returned dates. Implementation of the property calls FileSystemProvider methods, therefore repeated consecutive calls of the property can be expensive. Consider storing the value of the property in a local variable. Inherited from NodeBase. |
Methods
Name | Description |
---|---|
AsVDirectoryInfo() | Converts this instance to an equivalent instance of the VDirectoryInfo class. |
CopyTo(DirectoryNode) | Copies the node to the |
Create() | Creates this node, if it does not exist. Inherited from NodeBase. |
CreateFileSystem() | Creates new (virtual) FileSystemProvider with DirectoryNode root path. |
Delete() | Deletes this node. Inherited from NodeBase. |
Equals(NodeBase) | Indicates whether the current NodeBase is equal to another object of the same type. Inherited from NodeBase. |
Equals(Object) | Determines whether the specified |
Exists() | Gets a value indicating whether the node exists. Inherited from NodeBase. |
GetChildren() | Gets an enumerator that iterates through the child nodes in the current node. Inherited from NodeBase. |
GetChildren(NodeType) | Gets an enumerator that iterates through the child nodes in the current node.
Only nodes whose NodeType matches the |
GetContent(NodeContentParameters) | Gets the content of the node. Inherited from NodeBase. |
GetDirectories() | Gets an enumerator that iterates through the directories in the current directory. |
GetEnumerator() | Gets an enumerator that iterates through the child nodes in the current node. Inherited from NodeBase. |
GetFiles() | Gets an enumerator that iterates through the files in the current directory. |
GetHashCode() | Gets a hash code of this object. Inherited from NodeBase. |
GetUnaliasedNode() | Gets the node with real path (relative to FileSystemProvider) in the file system. Both MountCapableFileSystemProvider and FileSystemProvider returned from the method CreateFileSystem() create virtual nodes with virtual (alias) paths. Virtual node "wraps" real node. Use method GetUnaliasedNode to "unwrap" real nodes from virtual nodes. Calling method GetUnaliasedNode on the already unwrapped node has no effect - method returns this (already unwrapped) instance. Method GetUnaliasedNode is typically used in the FileSystemNotifier event handlers. Usually you don't need to call this method directly, because virtual (alias) and real nodes in the typical development scenario works as expected. Inherited from NodeBase. |
MoveTo(DirectoryNode) | Moves this node to the |
Rename(String) | Renames this node. Inherited from NodeBase. |
SetAttributes(NodeAttributes) | Sets attributes of the node. Inherited from NodeBase. |
SetContent(NodeContent) | Sets a new content of the node. Old content will be deleted! Inherited from NodeBase. |
SetTimeInfo(NodeTimeInfo) | Sets the time info of the node. Inherited from NodeBase. |
ToString() | Returns a string that represents the current NodeBase. Inherited from NodeBase. |
Explicit Interface Implementations
Name | Description |
---|---|
IEnumerable.GetEnumerator() | Gets an enumerator that iterates through the child nodes in the current node. Inherited from NodeBase. |