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¶
-
PathUtils.
Compare
(string pathA, string pathB) → int¶ Compares two scene graph location paths. Returns a negative value if
pathA
sorts beforepathB
, zero if both paths compare equal, and a positive value ifpathA
sorts afterpathB
.Each path component of
pathA
is compared lexicographically with the corresponding component ofpathB
. The function assumes normalized, absolute paths (except for superfluous trailing slashes, which are ignored).
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¶