Reference

std/fs

The file system: File, which is both a stream's reading end and its writing end, and IoError, what every operation here fails with. The whole-file helpers (readText, writeText, readBytes, writeBytes) are for what fits in memory; chunks(), lines() and the Sink side are for everything else (docs/design/STREAMS.md).

Around the contents: remove, rename, copy, createDirectory, removeDirectory, list and walk for the tree, metadata for what a path is, symbolic links, temporary files and directories, and writeBytesAtomically for a file that is replaced whole or not at all. Every one of them takes the same path text on every system - / between the names, a drive letter on Windows - and the runtime converts it where it calls the system (docs/design/PATH.md section 6), so nothing here branches on the operating system.

Modules

Everything