Skip to main content

read_file_text

Function read_file_text 

Source
pub fn read_file_text(path: &Path) -> Option<String>
Expand description

Reads a bounded UTF-8 file.

§Parameters

§Returns

Returns Some when crate::platform::read_file_text can produce a value and None otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::platform::read_file_text.

§Examples

ⓘ
let _result = pharos_native::platform::read_file_text(std::path::Path::new("fixture.json"));
  • crate::platform for adjacent helpers that share the same runtime surface.