Module io

Module io 

Source
Expand description

I/O utilities for SciRS2

This module provides utilities for input/output operations.

Functions§

create_directory
Creates a directory if it doesn’t exist
create_file
Opens a file for writing
directory_exists
Checks if a directory exists
file_exists
Checks if a file exists
filesize
Returns the file size in bytes
formatsize
Pretty-prints a file size with appropriate units
open_file
Opens a file for reading
read_lines
Reads a file line by line
read_to_bytes
Reads an entire file into a byte vector
read_to_string
Reads an entire file into a string
write_bytes
Writes bytes to a file
write_string
Writes a string to a file