mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
modules: create the modules directory if it's missing, use cache/
This commit is contained in:
10
vlib/os/os.v
10
vlib/os/os.v
@ -858,3 +858,13 @@ pub fn print_backtrace() {
|
||||
*/
|
||||
}
|
||||
|
||||
pub fn mkdir_all(path string) {
|
||||
mut p := ''
|
||||
for subdir in path.split(os.PathSeparator) {
|
||||
p += os.PathSeparator + subdir
|
||||
if !os.dir_exists(p) {
|
||||
os.mkdir(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user