Function: normalizeFileSystemRoot()
normalizeFileSystemRoot(
root?):string
Turn root into a POSIX filesystem root:
- Expand one-or-many input segments
- Strings split on
/(and\); objects/arrays FNV-hash as one piece - Each resulting component that cannot be a path component - see {@link UNSAFE_PATH_SEGMENT} - is replaced with {@link hash.fnvHash}
- Join with
/and run posixPath.normalizeRoot
Defaults to /. A leading / on the first string segment is preserved.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string
Example
Section titled “Example”normalizeFileSystemRoot("/cool/wow"); // "/cool/wow"normalizeFileSystemRoot("/Users/me@corp.com/My Notes"); // unchangednormalizeFileSystemRoot(["/path", { user: 1 }, true]); // "/path/<hash>/true"