Table of Contents

Class PathUtils

Namespace
Alternet.UI
Assembly
Alternet.UI.Interfaces.dll

Contains Path related static methods.

public static class PathUtils
Inheritance
PathUtils

Methods

AddDirectorySeparatorChar(string?)

Adds directory separator char to the path if it's needed. If path already has directory separator char at the end, no changes are performed.

CompareByFileName(string, string)

Compares two specified paths by file name and returns an integer that indicates their relative position in the sort order.

CreateExecutingAssemblyWithNewExt(string, string)

Creates file with the path and name of the executing assembly and with the specified extension.

DirectoryHasEntries(string)

Gets whether directory is not empty (contains files or sub-folders).

DirectoryIsEmpty(string)

Gets whether directory is empty (contains no files or sub-folders).

EndsWithDirectorySeparator(string?)

Returns boolean value indicating whether path ends with directory separator char.

ExtractDirectorySeparatorChar(string?)

Returns directory separator char which is used in given path.

GetAppFolder()

Returns path to the application folder.

GetAppSubFolder(string, bool)

Gets sub-folder path in the application folder.

GetExecutingAssemblyWithNewExt(string)

Gets file path and name of the executing assembly with the specified extension.

GetExtensionLower(string?)

Returns the extension of a file path in the lower case without leading period.

GetFullPath(string, string)

Returns an absolute path from a relative path and a fully qualified base path.

GetTempAppSubFolder()

Gets path to the 'Temp' sub-folder of the application folder.

PopDirectory()

Restores current directory path previously saved with PushDirectory(string). This method does the same as console command "popd".

PushDirectory(string)

Saves current directory path to memory and changes it to the specified path. Use PopDirectory() to restore saved folder. This method does the same as console command "pushd".

RemoveExecutingAssemblyWithExt(string)

Removes file with path and name of the executing assembly with the specified extension.