NodeBase Class
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9147)
Provides the base class for both File
It is not expected that you inherit from the class Node
Syntax
public abstract class NodeBase : IEnumerable<NodeBase>, IEnumerable
Inherited Members
Constructors
Name | Description |
---|---|
Node |
Initializes a new instance of the Node |
Properties
Name | Description |
---|---|
Attributes | Gets attributes of the node.
Implementation of the property calls File |
Context | Gets or sets user-defined object. |
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. |
Is |
Returns true if the node is deleted (does not exist in the file system), otherwise false.
Implementation of the property calls File |
Is |
Returns true if the current node is Directory |
Is |
Returns true if the current node is File |
Is |
Returns true if the current node is root Directory |
Length | Gets the length of the content returned by the method Get |
Name | Gets the name of the node. |
Node |
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. |
Path | Full path of the node. |
Time |
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 File |
Methods
Name | Description |
---|---|
Copy |
Copies the node to the |
Create() | Creates this node, if it does not exist. |
Delete() | Deletes this node. |
Equals(Node |
Indicates whether the current Node |
Equals(Object) | Determines whether the specified |
Exists() | Gets a value indicating whether the node exists. |
Get |
Gets an enumerator that iterates through the child nodes in the current node. |
Get |
Gets an enumerator that iterates through the child nodes in the current node.
Only nodes whose Node |
Get |
Gets the content of the node. |
Get |
Gets an enumerator that iterates through the child nodes in the current node. |
Get |
Gets a hash code of this object. |
Get |
Gets the node with real path (relative to File Calling method GetUnaliasedNode on the already unwrapped node has no effect - method returns this (already unwrapped) instance.
Method GetUnaliasedNode is typically used in the File |
Move |
Moves this node to the |
Rename(String) | Renames this node. |
Set |
Sets attributes of the node. |
Set |
Sets a new content of the node. Old content will be deleted! |
Set |
Sets the time info of the node. |
To |
Returns a string that represents the current Node |
Operators
Name | Description |
---|---|
Equality(Node |
Determines whether two specified Node |
Inequality(Node |
Determines whether two specified Node |
Explicit Interface Implementations
Name | Description |
---|---|
IEnumerable. |
Gets an enumerator that iterates through the child nodes in the current node. |