FS
File system helpers built on node:fs/promises.
rm
Recursively remove a file or directory.
validateFilePathOrCreateMkdir
Ensure every directory along a file path exists — creates missing ones. Useful before writing a file into a nested path.
cpFile
Copy a file, creating the target directory when needed.
Example: safe build output
A typical build-script combo — clean, ensure, copy:
