Class PathNormalizer
Path normalization by removing its .
and ..
segments and replacing \
with /
.
Inherited Members
Namespace: FubarDev.FtpServer.FileSystem
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public static class PathNormalizer
Methods
| Improve this Doc View SourceNormalizePath(IEnumerable<String>, Nullable<IEnumerable<String>>)
Normalize a path by removing its .
and ..
segments.
Declaration
public static IEnumerable<string> NormalizePath(this IEnumerable<string> pathSegments, IEnumerable<string>? previousPathSegments = default(IEnumerable<string>? ))
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | pathSegments | The segments of the path to normalize. |
Nullable<IEnumerable<String>> | previousPathSegments | Initial path segments to be used as reference. |
Returns
Type | Description |
---|---|
IEnumerable<String> | The normalized path segments. |
NormalizePath(String)
Normalize a path by removing its .
and ..
segments.
Declaration
public static string NormalizePath(this string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to normalize. |
Returns
Type | Description |
---|---|
String | The normalized path. |