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.

16 lines
473 B

4 years ago
  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;