Crate simpleio

Source

Enums§

DirStatus
Enum for possible outcomes when creating a directory

Functions§

create_dir
Creates the directory if it does not already exist.
file_exists
Returns true if the file exists, false if not. Directories are also files on unix.
get_config
Returns the config directory. It is just home/.config. All config files the application uses should be in home/.config/application-name. They should NOT be writen in the home directory as it clutters up the home dir and the .config was made for these files. However, many applications do this wrong. Just type la instead of ls inside your home dir to see evidence of that.
get_home
Returns the home directory of the user as a std::path::PathBuf.
get_home_string
Returns the home directory of the user as a String.
read_file_into_buffer
Reads file to the end into Vec.
read_file_into_string
Reads file to the end into String.
read_lines
Reads lines from file. Returns lines in vector.
read_lines_raw
Reads lines from file. Returns Lines iterator.