Utilities for interacting with the underlying operating system.
You can install this package either from VPM or from GitHub:
v install prantlf.osutil
v install --git https://github.com/prantlf/v-osutil
The following types and functions are exported:
pub struct ExecuteOpts {
trim_leading_whitespace bool
trim_trailing_whitespace bool
trim_leading_line_break bool
trim_trailing_line_break bool = true
}
execute(cmd string) !string
execute_opt(cmd string, opts &ExecuteOpts) !string
exist_in(names []string, dir string) ?string
find_file(name string) ?(string, string)
find_file_opt(name string, start_dir string, depth int) ?(string, string)
find_files(names []string) ?(string, string)
find_files_opt(names []string, start_dir string, depth int) ?(string, string)
In lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code.
Copyright (c) 2023-2025 Ferdinand Prantl
Licensed under the MIT license.