Skip to main content

Module fs

Module fs 

Source
Expand description

File system operations

Windjammer’s std::fs module maps to these functions.

Structs§

DirEntry
Directory entry wrapper

Functions§

copy
Copy a file
create_dir
Create a directory
create_dir_all
Create a directory and all parent directories
exists
Check if path exists
is_dir
Check if path is a directory
is_file
Check if path is a file
read
Read entire file as bytes
read_bytes
Alias for read() for clarity
read_dir
List directory entries
read_to_string
Read entire file as a string
remove_dir
Remove a directory
remove_dir_all
Remove a directory and all its contents
remove_file
Remove a file
rename
Rename a file or directory
write
Write to file (accepts bytes or strings)
write_string
Write string to file (helper for common case)