files.js 235 B

123456789101112
  1. const fs = require('fs');
  2. const path = require('path');
  3. module.exports = {
  4. getCurrentDirectoryBase: () => {
  5. return path.basename(process.cwd());
  6. },
  7. directoryExists: (filePath) => {
  8. return fs.existsSync(filePath);
  9. }
  10. };