rimraf-native.js 646 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.rimrafNativeSync = exports.rimrafNative = void 0;
  4. const fs_js_1 = require("./fs.js");
  5. const { rm } = fs_js_1.promises;
  6. const rimrafNative = async (path, opt) => {
  7. await rm(path, {
  8. ...opt,
  9. force: true,
  10. recursive: true,
  11. });
  12. return true;
  13. };
  14. exports.rimrafNative = rimrafNative;
  15. const rimrafNativeSync = (path, opt) => {
  16. (0, fs_js_1.rmSync)(path, {
  17. ...opt,
  18. force: true,
  19. recursive: true,
  20. });
  21. return true;
  22. };
  23. exports.rimrafNativeSync = rimrafNativeSync;
  24. //# sourceMappingURL=rimraf-native.js.map