renameFile : HasIO io => String -> String -> io (Either FileError ()) Rename a file. Returns `Left` on failure (most often: source missing or
permission denied). The `FileError` is `GenericFileError` carrying the
platform's raw return code, since structured errnos are not available
across all backends.
Totality: total
Visibility: exportrecord RotationConfig : Type Configuration for size-based file rotation.
Totality: total
Visibility: public export
Constructor: MkRotationConfig : Integer -> Nat -> RotationConfig
Projections:
.maxBytes : RotationConfig -> Integer Maximum bytes in the current file before rotation triggers.
.maxFiles : RotationConfig -> Nat Maximum number of rotated files to keep (file.1, file.2, ...).
Files beyond this are deleted after rotation.
.maxBytes : RotationConfig -> Integer Maximum bytes in the current file before rotation triggers.
Totality: total
Visibility: public exportmaxBytes : RotationConfig -> Integer Maximum bytes in the current file before rotation triggers.
Totality: total
Visibility: public export.maxFiles : RotationConfig -> Nat Maximum number of rotated files to keep (file.1, file.2, ...).
Files beyond this are deleted after rotation.
Totality: total
Visibility: public exportmaxFiles : RotationConfig -> Nat Maximum number of rotated files to keep (file.1, file.2, ...).
Files beyond this are deleted after rotation.
Totality: total
Visibility: public exportdefaultRotation : RotationConfig Default rotation: 10 MB per file, keep 5 rotated copies.
Totality: total
Visibility: public exportwithRotatingLogFile : HasIO io => String -> RotationConfig -> (LogAction io String -> io a) -> io (Either FileError a) Run a computation with a rotating file-backed `LogAction`.
Writes go to `basePath`. When size exceeds `config.maxBytes`,
`basePath` is renamed to `basePath.1`, previous `.1` becomes `.2`,
and so on up to `config.maxFiles`. Files beyond that count are
deleted on rotation.
Returns `Left FileError` if the initial open failed, otherwise
`Right` with the callback's result.
Totality: total
Visibility: export