audit-fs
Audit file/directory properties and content
- Declare expectations with chaining. Stop at first failure.
- Expectations:
exists
,hasFile
,hasDir
,minSize
,minCount
,maxCount
,created
,modified
. refute
API for negating any expectation.- Call any
shelljs
method or use wrappers likehasFile()
.
Examples
README.md
exists, no line with console.log
under lib/
Expect: var audit = ;audit ; // Target directory refute; if audit // Expectations met else var rule = audit; console;
Expect: Symlink present/absent
Use _() to run any ShellJS method.
audit;auditrefute;
Expect: Custom rule
assert() and refute() receive an OuterShelljs instance, shelljs
.
audit; audit;
Installation
NPM
npm install audit-fs
API
License
MIT
Tests
npm test