2020-12-30 22:36:54 +03:00
|
|
|
module main
|
|
|
|
|
|
|
|
import os
|
|
|
|
import v.vcache
|
2022-09-16 04:56:19 +03:00
|
|
|
import v.util
|
2020-12-30 22:36:54 +03:00
|
|
|
|
|
|
|
fn main() {
|
2022-09-16 04:56:19 +03:00
|
|
|
wipe_path(vcache.new_cache_manager([]).basepath, 'V cache')
|
|
|
|
wipe_path(util.get_vtmp_folder(), 'V tmp.c')
|
|
|
|
wipe_path(os.join_path(os.temp_dir(), 'v'), 'V tests')
|
|
|
|
}
|
|
|
|
|
|
|
|
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 {}
|
|
|
|
println('$label folder $cpath was wiped.')
|
2020-12-30 22:36:54 +03:00
|
|
|
}
|