Class Path
Inheritance
System.Object
Path
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Downlink.Core.IO
Assembly: Downlink.Core.dll
Syntax
public class Path
Constructors
| Improve this Doc View SourcePath(String)
Initializes a new instance of the Path class.
Declaration
protected Path(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
Properties
| Improve this Doc View SourceFullPath
Gets the full path.
Declaration
public string FullPath { get; }
Property Value
Type | Description |
---|---|
System.String | The full path. |
IsRelative
Gets a value indicating whether this path is relative.
Declaration
public bool IsRelative { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Segments
Gets the segments making up the path.
Declaration
public string[] Segments { get; }
Property Value
Type | Description |
---|---|
System.String[] | The segments making up the path. |
Methods
| Improve this Doc View SourceCollapse()
Collapses a Path containing ellipses.
Declaration
public Path Collapse()
Returns
Type | Description |
---|---|
Path | A collapsed Path. |
GetDirectory()
Gets the directory part of the path.
Declaration
public Path GetDirectory()
Returns
Type | Description |
---|---|
Path | The directory part of the path. |
GetFilename()
Gets the filename.
Declaration
public string GetFilename()
Returns
Type | Description |
---|---|
System.String | The filename. |
GetFilenameWithoutExtension()
Gets the filename without its extension.
Declaration
public string GetFilenameWithoutExtension()
Returns
Type | Description |
---|---|
System.String | The filename without its extension. |
Normalize()
Declaration
public void Normalize()
ToString()
Returns a string
that represents this path.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A |
Overrides
System.Object.ToString()
Operators
| Improve this Doc View SourceImplicit(Path to String)
Declaration
public static implicit operator string (Path p)
Parameters
Type | Name | Description |
---|---|---|
Path | p |
Returns
Type | Description |
---|---|
System.String |
Implicit(String to Path)
Performs an implicit conversion from a string to Path.
Declaration
public static implicit operator Path(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
Returns
Type | Description |
---|---|
Path | A Path. |