Skip to content

anio-fs-org/clean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@anio-fs/clean

Clean a directory.

import {clean, cleanSync} from "@anio-fs/clean"

await clean("./dir/")

//
// delete everything except root .gitkeep file
//
await clean("./dir/", {
	preserve(entry) {
		return entry.relative_path === ".gitkeep"
	}
})