Paths (OpScript)

Testing and Matching

PathUtils.IsAncestorOrEqual(string pathA, string pathB) → boolean
PathUtils.IsAncestor(string pathA, string pathB) → boolean
PathUtils.IsRelativePath(string path) → boolean
PathUtils.FnMatch(string testpath, string pattern) → boolean, boolean
PathUtils.ExactMatch(string testpath, string matchpath) → boolean, boolean

Extracting Components

PathUtils.GetLeafName(string path) → string
PathUtils.GetLeafAndParent(string path) → string, string
PathUtils.GetLocationParent(string path) → string
PathUtils.GetLocationStack(string path[, string rootPath]) → table<string>

Path Manipulation

PathUtils.Join(string pathA, string pathB) → string
PathUtils.NormalizedRelativePath(string rootPath, string path) → string
PathUtils.NormalizeAbsPath(string path) → string
PathUtils.RelativePath(string rootPath, string path) → string
PathUtils.RelativeToAbsPath(string rootPath, string path) → string

Identifiers

PathUtils.MakeUniqueName(string baseName, table<string> existingNames) → string
PathUtils.MakeSafeIdentifier(string ident) → string