Provides Unix-style path operations for remote paths using forward slash separators.
More...
|
| static string | NormalizePath (string path) |
| | Normalizes a path by ensuring a leading separator, collapsing repeated separators, and trimming trailing separators except for the root path.
|
| static string | Combine (string pathBase, string pathSuffix) |
| | Combines a base path and suffix into a single Unix-style path.
|
| static bool | PathsAreEqual (string? pathA, string? pathB) |
| | Determines whether two paths are equal after normalization using ordinal comparison.
|
| static bool | NamesAreEqual (string? nameA, string? nameB) |
| | Determines whether two names are equal using ordinal comparison.
|
| static string | GetParentDir (string path) |
| | Gets the parent directory for the provided path.
|
| static string | GetFileName (string path) |
| | Gets the file or directory name segment from the provided path.
|
| static string | GetExtension (string path) |
| | Gets the file extension (including leading dot) from the provided path.
|
Provides Unix-style path operations for remote paths using forward slash separators.
◆ Combine()
| string FileSurfer.Core.Models.RemoteUnixPathTools.Combine |
( |
string | pathBase, |
|
|
string | pathSuffix ) |
|
inlinestatic |
Combines a base path and suffix into a single Unix-style path.
- Parameters
-
| pathBase | Base path. |
| pathSuffix | Suffix path to append. |
- Returns
- Combined path with one directory separator between segments.
Implements FileSurfer.Core.Models.IPathTools.
◆ GetExtension()
| string FileSurfer.Core.Models.RemoteUnixPathTools.GetExtension |
( |
string | path | ) |
|
|
inlinestatic |
Gets the file extension (including leading dot) from the provided path.
- Parameters
-
- Returns
- File extension when present after the last separator; otherwise an empty string.
Implements FileSurfer.Core.Models.IPathTools.
◆ GetFileName()
| string FileSurfer.Core.Models.RemoteUnixPathTools.GetFileName |
( |
string | path | ) |
|
|
inlinestatic |
Gets the file or directory name segment from the provided path.
- Parameters
-
- Returns
- Final segment name, or an empty string for empty input.
Implements FileSurfer.Core.Models.IPathTools.
◆ GetParentDir()
| string FileSurfer.Core.Models.RemoteUnixPathTools.GetParentDir |
( |
string | path | ) |
|
|
inlinestatic |
◆ NamesAreEqual()
| bool FileSurfer.Core.Models.RemoteUnixPathTools.NamesAreEqual |
( |
string? | nameA, |
|
|
string? | nameB ) |
|
inlinestatic |
Determines whether two names are equal using ordinal comparison.
- Parameters
-
| nameA | First name. |
| nameB | Second name. |
- Returns
true when both names are non-null and equal; otherwise false.
Implements FileSurfer.Core.Models.IPathTools.
◆ NormalizePath()
| string FileSurfer.Core.Models.RemoteUnixPathTools.NormalizePath |
( |
string | path | ) |
|
|
inlinestatic |
Normalizes a path by ensuring a leading separator, collapsing repeated separators, and trimming trailing separators except for the root path.
- Parameters
-
- Returns
- Normalized Unix-style path.
Implements FileSurfer.Core.Models.IPathTools.
◆ PathsAreEqual()
| bool FileSurfer.Core.Models.RemoteUnixPathTools.PathsAreEqual |
( |
string? | pathA, |
|
|
string? | pathB ) |
|
inlinestatic |
Determines whether two paths are equal after normalization using ordinal comparison.
- Parameters
-
| pathA | First path. |
| pathB | Second path. |
- Returns
true when both paths are non-null and represent the same normalized path; otherwise false.
Implements FileSurfer.Core.Models.IPathTools.
◆ DirSeparator
| const char FileSurfer.Core.Models.RemoteUnixPathTools.DirSeparator = '/' |
|
static |
Directory separator used by this path tool.
◆ Instance
| readonly RemoteUnixPathTools FileSurfer.Core.Models.RemoteUnixPathTools.Instance = new() |
|
static |
◆ RootDir
| const string FileSurfer.Core.Models.RemoteUnixPathTools.RootDir = "/" |
|
static |
The documentation for this class was generated from the following file: