ae.utils.path

ae.utils.path

Members

Functions

excludeTrailingPathSeparator
string excludeTrailingPathSeparator(string path)

Like Pascal's ExcludeTrailingPathDelimiter

findExecutable
string findExecutable(string name, string[] dirs)

Find an executable with the given name (no extension) in the given directories. Returns null if not found.

includeTrailingPathSeparator
string includeTrailingPathSeparator(string path)

Like Pascal's IncludeTrailingPathDelimiter

pathStartsWith
bool pathStartsWith(in char[] path, in char[] prefix)

Like startsWith, but pathStartsWith("/foo/barbara", "/foo/bar") is false.

rebasePath
string rebasePath(string path, string oldBase, string newBase)

Modify a path under oldBase to a new path with the same subpath under newBase. E.g.: /foo/bar.rebasePath(/foo, /quux) == /quux/bar

Manifest constants

nullFileName
enum nullFileName;

The file name for the null device (which discards all writes).

Meta

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.