fs.js 473 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const fs = require("fs");
  4. exports.FILE_SYSTEM_ADAPTER = {
  5. lstat: fs.lstat,
  6. stat: fs.stat,
  7. lstatSync: fs.lstatSync,
  8. statSync: fs.statSync
  9. };
  10. function getFileSystemAdapter(fsMethods) {
  11. if (!fsMethods) {
  12. return exports.FILE_SYSTEM_ADAPTER;
  13. }
  14. return Object.assign({}, exports.FILE_SYSTEM_ADAPTER, fsMethods);
  15. }
  16. exports.getFileSystemAdapter = getFileSystemAdapter;