2020-12-30 22:36:54 +03:00
|
|
|
module main
|
|
|
|
|
|
|
|
import os
|
|
|
|
import v.vcache
|
|
|
|
|
|
|
|
fn main() {
|
2022-09-16 04:56:19 +03:00
|
|
|
wipe_path(vcache.new_cache_manager([]).basepath, 'V cache')
|
2022-11-03 10:24:52 +03:00
|
|
|
wipe_path(os.vtmp_dir(), 'V tmp.c and tests folder')
|
2022-09-16 04:56:19 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
fn wipe_path(cpath string, label string) {
|
2020-12-30 22:36:54 +03:00
|
|
|
if os.exists(cpath) && os.is_dir(cpath) {
|
2021-03-25 00:37:10 +03:00
|
|
|
os.rmdir_all(cpath) or {}
|
2020-12-30 22:36:54 +03:00
|
|
|
}
|
2022-09-16 04:56:19 +03:00
|
|
|
os.mkdir_all(cpath) or {}
|
2022-11-15 16:53:13 +03:00
|
|
|
println('${label} folder ${cpath} was wiped.')
|
2020-12-30 22:36:54 +03:00
|
|
|
}
|