Path resolution helpers.
import { desktop, doc, absolute, pathShort, parentDir } from '@epubknowledge/common/paths'| Export | Description |
|---|---|
desktop() |
Returns the current user's Desktop path |
doc() |
Returns the current user's Documents path |
absolute(p) |
Resolves a relative path against cwd(); returns PathError on failure |
pathShort(p) |
Expands "desktop" / "docs" / "documents" shorthands, then calls absolute() |
parentDir(filename) |
Returns path.dirname(filename) |