Class LinuxPath
Implements functionality much like Path, except for this class is oriented towards handling Linux-style paths on a remote (possibly a Windows) machine.
Namespace: Neon.IO
Assembly: Neon.Common.dll
Syntax
public static class LinuxPath
Methods
ChangeExtension(string, string)
Changes the file extension.
Declaration
public static string ChangeExtension(string path, string extension)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
string | extension | The new extension. |
Returns
Type | Description |
---|---|
string | The modified path. |
Combine(params string[])
Combines an array of strings into a path.
Declaration
public static string Combine(params string[] paths)
Parameters
Type | Name | Description |
---|---|---|
string[] | paths | The paths. |
Returns
Type | Description |
---|---|
string | The combined paths. |
GetDirectoryName(string)
Extracts the directory portion of a path.
Declaration
public static string GetDirectoryName(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
string | The directory portion. |
GetExtension(string)
Returns the file extension from a path.
Declaration
public static string GetExtension(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
string | The file extension. |
GetFileName(string)
Returns the file name and extension from a path.
Declaration
public static string GetFileName(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
string | The file name and extension. |
GetFileNameWithoutExtension(string)
Returns the file name from a path without the extension.
Declaration
public static string GetFileNameWithoutExtension(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
string | The file name without the extension. |
HasExtension(string)
Determines whether a path has a file extension.
Declaration
public static bool HasExtension(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
bool |
|
IsPathRooted(string)
Determines whether the path is rooted.
Declaration
public static bool IsPathRooted(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
bool |
|