esm.mjs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import _copy from './copy/index.js'
  2. import _empty from './empty/index.js'
  3. import _ensure from './ensure/index.js'
  4. import _json from './json/index.js'
  5. import _mkdirs from './mkdirs/index.js'
  6. import _move from './move/index.js'
  7. import _outputFile from './output-file/index.js'
  8. import _pathExists from './path-exists/index.js'
  9. import _remove from './remove/index.js'
  10. // NOTE: Only exports fs-extra's functions; fs functions must be imported from "node:fs" or "node:fs/promises"
  11. export const copy = _copy.copy
  12. export const copySync = _copy.copySync
  13. export const emptyDirSync = _empty.emptyDirSync
  14. export const emptydirSync = _empty.emptydirSync
  15. export const emptyDir = _empty.emptyDir
  16. export const emptydir = _empty.emptydir
  17. export const createFile = _ensure.createFile
  18. export const createFileSync = _ensure.createFileSync
  19. export const ensureFile = _ensure.ensureFile
  20. export const ensureFileSync = _ensure.ensureFileSync
  21. export const createLink = _ensure.createLink
  22. export const createLinkSync = _ensure.createLinkSync
  23. export const ensureLink = _ensure.ensureLink
  24. export const ensureLinkSync = _ensure.ensureLinkSync
  25. export const createSymlink = _ensure.createSymlink
  26. export const createSymlinkSync = _ensure.createSymlinkSync
  27. export const ensureSymlink = _ensure.ensureSymlink
  28. export const ensureSymlinkSync = _ensure.ensureSymlinkSync
  29. export const readJson = _json.readJson
  30. export const readJSON = _json.readJSON
  31. export const readJsonSync = _json.readJsonSync
  32. export const readJSONSync = _json.readJSONSync
  33. export const writeJson = _json.writeJson
  34. export const writeJSON = _json.writeJSON
  35. export const writeJsonSync = _json.writeJsonSync
  36. export const writeJSONSync = _json.writeJSONSync
  37. export const outputJson = _json.outputJson
  38. export const outputJSON = _json.outputJSON
  39. export const outputJsonSync = _json.outputJsonSync
  40. export const outputJSONSync = _json.outputJSONSync
  41. export const mkdirs = _mkdirs.mkdirs
  42. export const mkdirsSync = _mkdirs.mkdirsSync
  43. export const mkdirp = _mkdirs.mkdirp
  44. export const mkdirpSync = _mkdirs.mkdirpSync
  45. export const ensureDir = _mkdirs.ensureDir
  46. export const ensureDirSync = _mkdirs.ensureDirSync
  47. export const move = _move.move
  48. export const moveSync = _move.moveSync
  49. export const outputFile = _outputFile.outputFile
  50. export const outputFileSync = _outputFile.outputFileSync
  51. export const pathExists = _pathExists.pathExists
  52. export const pathExistsSync = _pathExists.pathExistsSync
  53. export const remove = _remove.remove
  54. export const removeSync = _remove.removeSync
  55. export default {
  56. ..._copy,
  57. ..._empty,
  58. ..._ensure,
  59. ..._json,
  60. ..._mkdirs,
  61. ..._move,
  62. ..._outputFile,
  63. ..._pathExists,
  64. ..._remove
  65. }