NodePath Class
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.Common.dll (version 7.0.9147)
Represents a file system path.
Syntax
public sealed class NodePath : IEnumerable<string>, IEnumerable, IEquatable<NodePath>
Inherited Members
Remarks
Instances of Node
- /ab/
- /AB/
- /aB/
- /Ab/
Constructors
Name | Description |
---|---|
Node |
Initializes a new instance of the Node Examples of the valid path: / /dir1 /dir1/ /dir1/dir2 /dir1/dir2/ /dir1/dir2/file.txt |
Fields
Name | Description |
---|---|
Directory |
Used directory separator. |
Empty | Represents the empty Node |
Root |
Name of the root directory. |
Properties
Name | Description |
---|---|
Allow |
Gets or sets a value indicating whether the backslash ('') character is allowed in File |
Comparer | Gets the IEqualityComparer that is used to determine equality of Node |
Extension | Gets the file name extension, or Empty if this path does not have extension. |
File |
Gets the name of the Directory |
File |
Gets the name without an extension. |
Has |
Indicates whether a path contains file name extension. |
Is |
Returns true if this path equals to Empty path, otherwise returns false. |
Is |
Indicates if this instance is the root path ('/'). |
Item[Int32] | Returns an element of this path. |
Parent |
Gets the parent path, or Empty path if this path does not have parent. |
Path |
Gets an enumerator that iterates through the elements of this path. |
Path |
Returns the number of elements in the path. |
String |
Methods
Name | Description |
---|---|
Add |
|
Add |
Creates new Node |
Change |
Creates new Node |
Combine(String[]) | Combines strings in the |
Equals(Node |
Indicates whether the current Node |
Equals(Object) | Determines whether the specified Node |
Get |
Gets an enumerator that iterates through the elements of this path. |
Get |
Gets a hash code of this object. |
Get |
Returns an array of characters not allowed in Name. |
Get |
Returns a subpath that is a subsequence of the parts of this path.
Subpath starts with the first part (on the index 0) of this path
and ends with the part on the index Root path ('/') does not have any subpath.
For the Node GetSubPath(0) returns '/dir1'. GetSubPath(1) returns '/dir1/dir2'. GetSubPath(2) returns 'dir1/dir2/file.txt'.
GetSubPath(3) throws Argument |
Is |
Indicates whether the specified Node |
Remove |
Creates new Node |
Starts |
Tests if this Node |
To |
Returns a string that represents the current Node |
Operators
Name | Description |
---|---|
Equality(Node |
Determines whether two specified Node |
Explicit(Node |
Convert the value of the |
Implicit(String to Node |
Convert the value of |
Inequality(Node |
Determines whether two specified Node |
Explicit Interface Implementations
Name | Description |
---|---|
IEnumerable. |
Gets an enumerator that iterates through the elements of this path. |