| 1 | module main |
| 2 | |
| 3 | import os |
| 4 | import v.vcache |
| 5 | |
| 6 | fn 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 | |
| 11 | fn 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 | } |
| 18 |