apps-script-utils 2.1.1 Help

ParsedPath

type ParsedPath =

root is the leading separator or scheme, dir everything up to the last separator, base the file name with its extension, name the same without it, and ext the extension including its dot.

Every part is optional, and a path that lacks one comes back without that key rather than with an empty string — so a bare file name yields base, name and ext alone. It is the shape Node's path.parse returns, which is what makes the two interchangeable in code that has to run in both places.

Examples

Shape

parse("/a/b/c.txt"); // => { root: "/", dir: "/a/b", base: "c.txt", name: "c", ext: ".txt" } parse("readme.md"); // => { base: "readme.md", name: "readme", ext: ".md" }

See also

Source

src/net/path/types/ParsedPath.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.