Skip to main content

Module fs

Module fs 

Source
Expand description

Provides the fs module.

§Examples

ⓘ
use pharos_runtime_core::fs;
  • crate for sibling modules in the same crate.

Constants§

PRIVATE_FILE_MODE
Default private runtime-state mode on Unix hosts.

Statics§

TEMP_FILE_COUNTER 🔒

Functions§

append_file_within
Appends bytes to a regular file below an explicit capability root.
append_json_record_once
Writes a local JSONL outbox delivery once across retries and processes. A separate OS-locked companion survives atomic destination replacement. Both reading and replacement are bounded to 64 MiB; incomplete records fail closed instead of losing existing output or duplicating a delivery.
atomic_write 🔒
Replaces a file through a same-directory durable temporary file.
ensure_directory
Ensures directory.
sync_directory 🔒
Performs sync directory.
temporary_path 🔒
Builds the temporary path.
validate_write_destination 🔒
Resolves a write destination below a trusted root without following a final symlink.
write_binary_file
Writes bytes using the destination directory as the least-authority capability root.
write_file_within
Writes bytes below an explicit capability root through durable atomic replacement.
write_text_file
Writes a text document through durable atomic replacement.