wget vlang.io/v.c && gcc -o v v.c
This is a very early version of vlib. Many of the types and function signatures are going to change.
Generated with vdoc. Not sorted alphabetically yet.
`read_file` reads the file in `path` and returns the contents.
TODO return `?string`
`file_size` returns the size of the file located in `path`.
`read_lines` reads the file in `path` into an array of lines.
`create` creates a file at a specified location and returns a writable `File` object.
`system2` starts the specified command, waits for it to complete, and returns its code.
`system` starts the specified command, waits for it to complete, and returns its output.
TODO merge the two functions.
`getenv` returns the value of the environment variable named by the key.
`file_exists` returns true if `path` exists.
`mkdir` creates a new directory with the specified path.
`rm` removes file in `path`.
`home_dir` returns path to user's home directory.