Class PhoenixPath
Allows to identify file or directories on a device by combining its path with the type of the operating system where it resides.
Inheritance
Inherited Members
Namespace: Phoenix.DeviceStorage
Assembly: Phoenix.Abstractions.DeviceStorage.dll
Syntax
public class PhoenixPath
Constructors
View SourcePhoenixPath(String)
Initializes a new instance of the PhoenixPath class for Windows paths.
Declaration
public PhoenixPath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to a file or directory in the local Windows machine. |
Remarks
This constructor is used for Windows paths, and does not verify if the path exists.
PhoenixPath(String, IDevice, PhoenixIOType)
Initializes a new instance of the PhoenixPath class.
Declaration
public PhoenixPath(string path, IDevice device, PhoenixIOType type)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to a file or directory. |
IDevice | device | The device where the file/directory resides. |
PhoenixIOType | type | The type of OS where the file/directory resides in. |
Remarks
This constructor does not verify if the path exists.
PhoenixPath(String, IDevice, PhoenixIOType, String)
Initializes a new instance of the PhoenixPath class.
Declaration
public PhoenixPath(string path, IDevice device, PhoenixIOType type, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to a file or directory. |
IDevice | device | The device where the file/directory resides. |
PhoenixIOType | type | The type of OS where the file/directory resides in. |
System.String | name | The name of the file. |
Remarks
This constructor does not verify if the path exists.
Properties
View SourceDevice
Gets the device to do a file IO operation.
Declaration
public IDevice Device { get; }
Property Value
Type | Description |
---|---|
IDevice |
DirectoryName
Gets the directory name of the path.
Declaration
public string DirectoryName { get; }
Property Value
Type | Description |
---|---|
System.String | The directory name. |
Extension
Gets the Extension of the path.
Declaration
public string Extension { get; }
Property Value
Type | Description |
---|---|
System.String | The extension. |
FullName
Gets the path to the file or directory represented by this object.
Declaration
public string FullName { get; }
Property Value
Type | Description |
---|---|
System.String |
IOType
Gets the type of operating system in which the file resides.
Declaration
public PhoenixIOType IOType { get; }
Property Value
Type | Description |
---|---|
PhoenixIOType |
Name
Gets the file name of the path.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The file name. |
PathRoot
Gets the path's root.
Declaration
public string PathRoot { get; }
Property Value
Type | Description |
---|---|
System.String | The path root. |
Methods
View SourceCloneForNewDevice(IDevice)
Clones this path with a different device.
Declaration
public PhoenixPath CloneForNewDevice(IDevice newDevice)
Parameters
Type | Name | Description |
---|---|---|
IDevice | newDevice | The device to clone this path to. |
Returns
Type | Description |
---|---|
PhoenixPath | The cloned PhoenixPath. |