Expand description
File I/O Operations for Seq
Provides file reading operations for Seq programs.
§Usage from Seq
"config.json" file-slurp # ( String -- String ) read entire file
"config.json" file-exists? # ( String -- Int ) 1 if exists, 0 otherwise§Example
: main ( -- Int )
"config.json" file-exists? if
"config.json" file-slurp write_line
else
"File not found" write_line
then
0
;Re-exports§
pub use patch_seq_file_exists as file_exists;pub use patch_seq_file_slurp as file_slurp;pub use patch_seq_file_slurp_safe as file_slurp_safe;
Functions§
- patch_
seq_ ⚠file_ exists - Check if a file exists
- patch_
seq_ ⚠file_ slurp - Read entire file contents as a string
- patch_
seq_ ⚠file_ slurp_ safe - Read entire file contents as a string, with error handling