You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- const fs = require('fs-extra');
-
- exports.isEmpty = (path) => {
- try {
- let stat = fs.statSync(path);
- if (!stat.isDirectory()) return true;
- let items = fs.readdirSync(path);
- return !items || !items.length;
- } catch (e) {
- return true;
- }
- }
|