Sisk

Class

PathHelper

Namespace
Sisk.Core.Helpers
Assembly
Sisk.Core.dll

Provides useful path-dedicated helper members.

C#
public sealed class PathHelper

Inheritance #

object ← PathHelper

Inherited Members #

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
PathHelper()

Methods #

NameDescription
CombinePaths(params string[])Combines the specified URL paths into one.
EnsureDirectoryExistance(string)Ensures that the specified directory exists, creating it if necessary.
EnsureFileDirectoryExistance(string)Ensures that the directory for the specified file path exists, creating it if necessary.
FilesystemCombinePaths(bool, char, params string[])Normalizes and combines the specified file-system paths into one.
FilesystemCombinePaths(bool, char, ReadOnlySpan<string>)Normalizes and combines the specified file-system paths into one.
FilesystemCombinePaths(params string[])Normalizes and combines the specified file-system paths into one, using the default environment directory separator char.
IsPathAllowed(string)Determines whether the specified path contains only valid path and file-name characters.
NormalizePath(string, char, bool)Normalize the given path to use the specified directory separator, trim the last separator and remove empty entries.
Pop(string)Removes the last segment from the specified path.
Split(string)Splits the specified path into its individual segments, removing empty entries and trimming whitespace.

Type to search the documentation and the API reference.