Skip to content

path

Documentation / @wtf/platform-fs / path

Paths of a folder’s handle: partsOf, the names of a path, / or \ between them, and none of them .. out of the folder; {@link at}, the handle of a path, found, or made with each folder on the way; and {@link parent}, the folder of a path and its name there. A path is of the folder it is given, which is its root: /notes/today.md, notes/today.md and notes/./today.md are one. What a handle threw is raised as fsErrorOf of ./errors has it.

const file = await at(root, 'notes/today.md', { kind: 'file', create: true })
const writable = await file.createWritable()
await writable.write('# Today\n')
await writable.close()

Type Aliases

Functions