v / cmd / tools
Raw file | 17 loc (14 sloc) | 364 bytes | Latest commit hash 017ace6ea
1module main
2
3import os
4import v.vcache
5
6fn main() {
7 wipe_path(vcache.new_cache_manager([]).basepath, 'V cache')
8 wipe_path(os.vtmp_dir(), 'V tmp.c and tests folder')
9}
10
11fn wipe_path(cpath string, label string) {
12 if os.exists(cpath) && os.is_dir(cpath) {
13 os.rmdir_all(cpath) or {}
14 }
15 os.mkdir_all(cpath) or {}
16 println('${label} folder ${cpath} was wiped.')
17}