Documentation
¶
Overview ¶
Package fsutil holds the small filesystem helpers shared by the agents (tree copies for spooling and migration) and by the job specs (archive entry names). It only uses the standard library and executes nothing, so server-side packages may import it too.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
CopyFile copies one regular file (creating the parent directory), keeping its mode, modification time and ownership (best effort)
func CopyMissing ¶
CopyMissing is CopyTree for the files that do not exist below dst yet; it returns how many files it copied.
func CopyTree ¶
CopyTree copies src into dst recursively, keeping modes, modification times, ownership (best effort, needs root) and symlinks; existing files are overwritten. Devices, sockets and fifos are skipped.
func FlattenPath ¶
FlattenPath turns an absolute path into a single name usable as an archive entry (`/var/lib/mydir` → `var-lib-mydir`, `D:\data\x` → `D-data-x`, `/` → `root`). Both path styles are handled on every platform, so the slash-only path package is used.
Types ¶
This section is empty.