@duplojs/server 0.0.0-stage → 0.1.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/README.md +8 -2
  2. package/dist/_virtual/_rolldown/runtime.cjs +33 -0
  3. package/dist/_virtual/_rolldown/runtime.mjs +17 -0
  4. package/dist/command/argument.cjs +27 -0
  5. package/dist/command/argument.d.ts +18 -0
  6. package/dist/command/argument.mjs +24 -0
  7. package/dist/command/create.cjs +102 -0
  8. package/dist/command/create.d.ts +47 -0
  9. package/dist/command/create.mjs +96 -0
  10. package/dist/command/error.cjs +206 -0
  11. package/dist/command/error.d.ts +61 -0
  12. package/dist/command/error.mjs +193 -0
  13. package/dist/command/exec.cjs +19 -0
  14. package/dist/command/exec.d.ts +14 -0
  15. package/dist/command/exec.mjs +17 -0
  16. package/dist/command/execOptions.cjs +41 -0
  17. package/dist/command/execOptions.d.ts +14 -0
  18. package/dist/command/execOptions.mjs +37 -0
  19. package/dist/command/help.cjs +250 -0
  20. package/dist/command/help.d.ts +10 -0
  21. package/dist/command/help.mjs +237 -0
  22. package/dist/command/index.cjs +82 -0
  23. package/dist/command/index.d.ts +8 -0
  24. package/dist/command/index.mjs +47 -0
  25. package/dist/command/kind.cjs +7 -0
  26. package/dist/command/kind.d.ts +2 -0
  27. package/dist/command/kind.mjs +5 -0
  28. package/dist/command/options/base.cjs +76 -0
  29. package/dist/command/options/base.d.ts +30 -0
  30. package/dist/command/options/base.mjs +69 -0
  31. package/dist/command/options/defaults/array.cjs +35 -0
  32. package/dist/command/options/defaults/array.d.ts +26 -0
  33. package/dist/command/options/defaults/array.mjs +29 -0
  34. package/dist/command/options/defaults/boolean.cjs +28 -0
  35. package/dist/command/options/defaults/boolean.d.ts +14 -0
  36. package/dist/command/options/defaults/boolean.mjs +25 -0
  37. package/dist/command/options/defaults/index.d.ts +3 -0
  38. package/dist/command/options/defaults/simple.cjs +25 -0
  39. package/dist/command/options/defaults/simple.d.ts +18 -0
  40. package/dist/command/options/defaults/simple.mjs +22 -0
  41. package/dist/command/options/identifier.cjs +7 -0
  42. package/dist/command/options/identifier.d.ts +4 -0
  43. package/dist/command/options/identifier.mjs +5 -0
  44. package/dist/command/options/index.d.ts +4 -0
  45. package/dist/command/options/types/index.d.ts +1 -0
  46. package/dist/command/options/types/options.d.ts +9 -0
  47. package/dist/command/types/eligibleType.d.ts +4 -0
  48. package/dist/command/types/forbiddenDuplicateName.d.ts +11 -0
  49. package/dist/command/types/forbiddenInvalidIdentifier.d.ts +6 -0
  50. package/dist/command/types/index.d.ts +3 -0
  51. package/dist/common/environmentVariable/expandEnvironmentVariables.cjs +27 -0
  52. package/dist/common/environmentVariable/expandEnvironmentVariables.d.ts +2 -0
  53. package/dist/common/environmentVariable/expandEnvironmentVariables.mjs +22 -0
  54. package/dist/common/environmentVariable/index.cjs +47 -0
  55. package/dist/common/environmentVariable/index.d.ts +16 -0
  56. package/dist/common/environmentVariable/index.mjs +41 -0
  57. package/dist/common/environmentVariable/overrideEnvironmentVariables.cjs +13 -0
  58. package/dist/common/environmentVariable/overrideEnvironmentVariables.d.ts +3 -0
  59. package/dist/common/environmentVariable/overrideEnvironmentVariables.mjs +9 -0
  60. package/dist/common/environmentVariable/parseEnvironmentFiles.cjs +32 -0
  61. package/dist/common/environmentVariable/parseEnvironmentFiles.d.ts +5 -0
  62. package/dist/common/environmentVariable/parseEnvironmentFiles.mjs +26 -0
  63. package/dist/common/environmentVariableOrThrow.cjs +23 -0
  64. package/dist/common/environmentVariableOrThrow.d.ts +12 -0
  65. package/dist/common/environmentVariableOrThrow.mjs +19 -0
  66. package/dist/common/exitProcess.cjs +7 -0
  67. package/dist/common/exitProcess.d.ts +6 -0
  68. package/dist/common/exitProcess.mjs +8 -0
  69. package/dist/common/getCurrentWorkDirectory.cjs +15 -0
  70. package/dist/common/getCurrentWorkDirectory.d.ts +8 -0
  71. package/dist/common/getCurrentWorkDirectory.mjs +11 -0
  72. package/dist/common/getCurrentWorkDirectoryOrThrow.cjs +25 -0
  73. package/dist/common/getCurrentWorkDirectoryOrThrow.d.ts +8 -0
  74. package/dist/common/getCurrentWorkDirectoryOrThrow.mjs +20 -0
  75. package/dist/common/getProcessArguments.cjs +18 -0
  76. package/dist/common/getProcessArguments.d.ts +6 -0
  77. package/dist/common/getProcessArguments.mjs +18 -0
  78. package/dist/common/index.cjs +44 -0
  79. package/dist/common/index.d.ts +9 -0
  80. package/dist/common/index.mjs +27 -0
  81. package/dist/common/meta/getCurrentDirectoryName.cjs +10 -0
  82. package/dist/common/meta/getCurrentDirectoryName.d.ts +7 -0
  83. package/dist/common/meta/getCurrentDirectoryName.mjs +7 -0
  84. package/dist/common/meta/index.d.ts +7 -0
  85. package/dist/common/setCurrentWorkingDirectory.cjs +11 -0
  86. package/dist/common/setCurrentWorkingDirectory.d.ts +8 -0
  87. package/dist/common/setCurrentWorkingDirectory.mjs +9 -0
  88. package/dist/common/setCurrentWorkingDirectoryOrThrow.cjs +23 -0
  89. package/dist/common/setCurrentWorkingDirectoryOrThrow.d.ts +8 -0
  90. package/dist/common/setCurrentWorkingDirectoryOrThrow.mjs +18 -0
  91. package/dist/dataStructure/common/codec/defaults/index.d.ts +2 -0
  92. package/dist/dataStructure/common/codec/defaults/json.cjs +25 -0
  93. package/dist/dataStructure/common/codec/defaults/json.d.ts +9 -0
  94. package/dist/dataStructure/common/codec/defaults/json.mjs +22 -0
  95. package/dist/dataStructure/common/codec/defaults/string.cjs +25 -0
  96. package/dist/dataStructure/common/codec/defaults/string.d.ts +13 -0
  97. package/dist/dataStructure/common/codec/defaults/string.mjs +22 -0
  98. package/dist/dataStructure/common/codec/index.d.ts +1 -0
  99. package/dist/dataStructure/common/error/defaultInterpreter.cjs +29 -0
  100. package/dist/dataStructure/common/error/defaultInterpreter.d.ts +69 -0
  101. package/dist/dataStructure/common/error/defaultInterpreter.mjs +26 -0
  102. package/dist/dataStructure/common/error/index.d.ts +1 -0
  103. package/dist/dataStructure/common/index.d.ts +2 -0
  104. package/dist/dataStructure/constraint/fileExist.cjs +19 -0
  105. package/dist/dataStructure/constraint/fileExist.d.ts +10 -0
  106. package/dist/dataStructure/constraint/fileExist.mjs +15 -0
  107. package/dist/dataStructure/constraint/folderExist.cjs +19 -0
  108. package/dist/dataStructure/constraint/folderExist.d.ts +10 -0
  109. package/dist/dataStructure/constraint/folderExist.mjs +15 -0
  110. package/dist/dataStructure/constraint/index.d.ts +5 -0
  111. package/dist/dataStructure/constraint/mimeType.cjs +18 -0
  112. package/dist/dataStructure/constraint/mimeType.d.ts +11 -0
  113. package/dist/dataStructure/constraint/mimeType.mjs +14 -0
  114. package/dist/dataStructure/constraint/size.cjs +29 -0
  115. package/dist/dataStructure/constraint/size.d.ts +16 -0
  116. package/dist/dataStructure/constraint/size.mjs +24 -0
  117. package/dist/dataStructure/constraint/types/constraints.d.ts +12 -0
  118. package/dist/dataStructure/constraint/types/index.d.ts +1 -0
  119. package/dist/dataStructure/fundamentalType/file.cjs +11 -0
  120. package/dist/dataStructure/fundamentalType/file.d.ts +8 -0
  121. package/dist/dataStructure/fundamentalType/file.mjs +8 -0
  122. package/dist/dataStructure/fundamentalType/folder.cjs +11 -0
  123. package/dist/dataStructure/fundamentalType/folder.d.ts +8 -0
  124. package/dist/dataStructure/fundamentalType/folder.mjs +8 -0
  125. package/dist/dataStructure/fundamentalType/index.d.ts +3 -0
  126. package/dist/dataStructure/fundamentalType/types/fundamentalTypes.d.ts +8 -0
  127. package/dist/dataStructure/fundamentalType/types/index.d.ts +1 -0
  128. package/dist/dataStructure/helper/file.cjs +10 -0
  129. package/dist/dataStructure/helper/file.d.ts +3 -0
  130. package/dist/dataStructure/helper/file.mjs +8 -0
  131. package/dist/dataStructure/helper/fileExist.cjs +7 -0
  132. package/dist/dataStructure/helper/fileExist.d.ts +2 -0
  133. package/dist/dataStructure/helper/fileExist.mjs +7 -0
  134. package/dist/dataStructure/helper/folder.cjs +10 -0
  135. package/dist/dataStructure/helper/folder.d.ts +3 -0
  136. package/dist/dataStructure/helper/folder.mjs +8 -0
  137. package/dist/dataStructure/helper/folderExist.cjs +7 -0
  138. package/dist/dataStructure/helper/folderExist.d.ts +2 -0
  139. package/dist/dataStructure/helper/folderExist.mjs +7 -0
  140. package/dist/dataStructure/helper/index.d.ts +6 -0
  141. package/dist/dataStructure/helper/mimeType.cjs +7 -0
  142. package/dist/dataStructure/helper/mimeType.d.ts +2 -0
  143. package/dist/dataStructure/helper/mimeType.mjs +7 -0
  144. package/dist/dataStructure/helper/size.cjs +7 -0
  145. package/dist/dataStructure/helper/size.d.ts +2 -0
  146. package/dist/dataStructure/helper/size.mjs +7 -0
  147. package/dist/dataStructure/index.cjs +83 -0
  148. package/dist/dataStructure/index.d.ts +6 -0
  149. package/dist/dataStructure/index.mjs +51 -0
  150. package/dist/dataStructure/kind.cjs +7 -0
  151. package/dist/dataStructure/kind.d.ts +2 -0
  152. package/dist/dataStructure/kind.mjs +5 -0
  153. package/dist/dataStructure/type/file.cjs +14 -0
  154. package/dist/dataStructure/type/file.d.ts +11 -0
  155. package/dist/dataStructure/type/file.mjs +11 -0
  156. package/dist/dataStructure/type/folder.cjs +14 -0
  157. package/dist/dataStructure/type/folder.d.ts +11 -0
  158. package/dist/dataStructure/type/folder.mjs +11 -0
  159. package/dist/dataStructure/type/index.d.ts +3 -0
  160. package/dist/dataStructure/type/types/index.d.ts +1 -0
  161. package/dist/dataStructure/type/types/types.d.ts +8 -0
  162. package/dist/file/appendFile.cjs +67 -0
  163. package/dist/file/appendFile.d.ts +43 -0
  164. package/dist/file/appendFile.mjs +54 -0
  165. package/dist/file/appendTextFile.cjs +67 -0
  166. package/dist/file/appendTextFile.d.ts +43 -0
  167. package/dist/file/appendTextFile.mjs +54 -0
  168. package/dist/file/copy.cjs +53 -0
  169. package/dist/file/copy.d.ts +43 -0
  170. package/dist/file/copy.mjs +40 -0
  171. package/dist/file/createEntryInterface.cjs +19 -0
  172. package/dist/file/createEntryInterface.d.ts +3 -0
  173. package/dist/file/createEntryInterface.mjs +15 -0
  174. package/dist/file/ensureDirectory.cjs +52 -0
  175. package/dist/file/ensureDirectory.d.ts +36 -0
  176. package/dist/file/ensureDirectory.mjs +41 -0
  177. package/dist/file/ensureFile.cjs +60 -0
  178. package/dist/file/ensureFile.d.ts +39 -0
  179. package/dist/file/ensureFile.mjs +48 -0
  180. package/dist/file/exists.cjs +43 -0
  181. package/dist/file/exists.d.ts +27 -0
  182. package/dist/file/exists.mjs +35 -0
  183. package/dist/file/fileInterface.cjs +76 -0
  184. package/dist/file/fileInterface.d.ts +31 -0
  185. package/dist/file/fileInterface.mjs +70 -0
  186. package/dist/file/folderInterface.cjs +76 -0
  187. package/dist/file/folderInterface.d.ts +33 -0
  188. package/dist/file/folderInterface.mjs +70 -0
  189. package/dist/file/index.cjs +634 -0
  190. package/dist/file/index.d.ts +35 -0
  191. package/dist/file/index.mjs +335 -0
  192. package/dist/file/link.cjs +70 -0
  193. package/dist/file/link.d.ts +46 -0
  194. package/dist/file/link.mjs +56 -0
  195. package/dist/file/linkStat.cjs +98 -0
  196. package/dist/file/linkStat.d.ts +31 -0
  197. package/dist/file/linkStat.mjs +88 -0
  198. package/dist/file/makeDirectory.cjs +60 -0
  199. package/dist/file/makeDirectory.d.ts +45 -0
  200. package/dist/file/makeDirectory.mjs +47 -0
  201. package/dist/file/makeTemporaryDirectory.cjs +48 -0
  202. package/dist/file/makeTemporaryDirectory.d.ts +32 -0
  203. package/dist/file/makeTemporaryDirectory.mjs +38 -0
  204. package/dist/file/makeTemporaryFile.cjs +62 -0
  205. package/dist/file/makeTemporaryFile.d.ts +36 -0
  206. package/dist/file/makeTemporaryFile.mjs +50 -0
  207. package/dist/file/move.cjs +71 -0
  208. package/dist/file/move.d.ts +46 -0
  209. package/dist/file/move.mjs +57 -0
  210. package/dist/file/readDirectory.cjs +44 -0
  211. package/dist/file/readDirectory.d.ts +35 -0
  212. package/dist/file/readDirectory.mjs +33 -0
  213. package/dist/file/readFile.cjs +51 -0
  214. package/dist/file/readFile.d.ts +33 -0
  215. package/dist/file/readFile.mjs +41 -0
  216. package/dist/file/readJsonFile.cjs +51 -0
  217. package/dist/file/readJsonFile.d.ts +33 -0
  218. package/dist/file/readJsonFile.mjs +41 -0
  219. package/dist/file/readLink.cjs +46 -0
  220. package/dist/file/readLink.d.ts +30 -0
  221. package/dist/file/readLink.mjs +37 -0
  222. package/dist/file/readTextFile.cjs +51 -0
  223. package/dist/file/readTextFile.d.ts +33 -0
  224. package/dist/file/readTextFile.mjs +41 -0
  225. package/dist/file/realPath.cjs +42 -0
  226. package/dist/file/realPath.d.ts +27 -0
  227. package/dist/file/realPath.mjs +34 -0
  228. package/dist/file/relocate.cjs +83 -0
  229. package/dist/file/relocate.d.ts +46 -0
  230. package/dist/file/relocate.mjs +68 -0
  231. package/dist/file/remove.cjs +60 -0
  232. package/dist/file/remove.d.ts +42 -0
  233. package/dist/file/remove.mjs +48 -0
  234. package/dist/file/rename.cjs +83 -0
  235. package/dist/file/rename.d.ts +46 -0
  236. package/dist/file/rename.mjs +68 -0
  237. package/dist/file/setMode.cjs +65 -0
  238. package/dist/file/setMode.d.ts +45 -0
  239. package/dist/file/setMode.mjs +56 -0
  240. package/dist/file/setOwner.cjs +53 -0
  241. package/dist/file/setOwner.d.ts +35 -0
  242. package/dist/file/setOwner.mjs +44 -0
  243. package/dist/file/setTime.cjs +55 -0
  244. package/dist/file/setTime.d.ts +36 -0
  245. package/dist/file/setTime.mjs +45 -0
  246. package/dist/file/stat.cjs +99 -0
  247. package/dist/file/stat.d.ts +62 -0
  248. package/dist/file/stat.mjs +89 -0
  249. package/dist/file/symlink.cjs +64 -0
  250. package/dist/file/symlink.d.ts +48 -0
  251. package/dist/file/symlink.mjs +52 -0
  252. package/dist/file/truncate.cjs +60 -0
  253. package/dist/file/truncate.d.ts +42 -0
  254. package/dist/file/truncate.mjs +47 -0
  255. package/dist/file/unknownEntryInterface.cjs +40 -0
  256. package/dist/file/unknownEntryInterface.d.ts +17 -0
  257. package/dist/file/unknownEntryInterface.mjs +35 -0
  258. package/dist/file/walkDirectory.cjs +57 -0
  259. package/dist/file/walkDirectory.d.ts +37 -0
  260. package/dist/file/walkDirectory.mjs +45 -0
  261. package/dist/file/writeFile.cjs +68 -0
  262. package/dist/file/writeFile.d.ts +43 -0
  263. package/dist/file/writeFile.mjs +55 -0
  264. package/dist/file/writeJsonFile.cjs +77 -0
  265. package/dist/file/writeJsonFile.d.ts +46 -0
  266. package/dist/file/writeJsonFile.mjs +64 -0
  267. package/dist/file/writeTextFile.cjs +68 -0
  268. package/dist/file/writeTextFile.d.ts +43 -0
  269. package/dist/file/writeTextFile.mjs +55 -0
  270. package/dist/implementor.cjs +67 -0
  271. package/dist/implementor.d.ts +35 -0
  272. package/dist/implementor.mjs +55 -0
  273. package/dist/index.cjs +76 -0
  274. package/dist/index.d.ts +9 -0
  275. package/dist/index.mjs +15 -0
  276. package/dist/kind.cjs +7 -0
  277. package/dist/kind.d.ts +2 -0
  278. package/dist/kind.mjs +5 -0
  279. package/dist/override.d.ts +8 -0
  280. package/package.json +81 -3
@@ -0,0 +1,43 @@
1
+ import * as DEither from "@duplojs/lang/either";
2
+ import type * as DPath from "@duplojs/lang/path";
3
+ import * as DCommon from "@duplojs/lang/common";
4
+ declare const CopyErrorNotFound_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-not-found", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-not-found", unknown>>, unknown>;
5
+ export declare class CopyErrorNotFound extends CopyErrorNotFound_base {
6
+ }
7
+ declare const CopyErrorPermissionDenied_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-permission-denied", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-permission-denied", unknown>>, unknown>;
8
+ export declare class CopyErrorPermissionDenied extends CopyErrorPermissionDenied_base {
9
+ }
10
+ declare const CopyErrorAlreadyExists_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-already-exists", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-already-exists", unknown>>, unknown>;
11
+ export declare class CopyErrorAlreadyExists extends CopyErrorAlreadyExists_base {
12
+ }
13
+ declare const CopyErrorNotDirectory_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-not-directory", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-not-directory", unknown>>, unknown>;
14
+ export declare class CopyErrorNotDirectory extends CopyErrorNotDirectory_base {
15
+ }
16
+ declare const CopyErrorNoSpace_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-no-space", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-no-space", unknown>>, unknown>;
17
+ export declare class CopyErrorNoSpace extends CopyErrorNoSpace_base {
18
+ }
19
+ declare const CopyErrorReadOnly_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-read-only", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-read-only", unknown>>, unknown>;
20
+ export declare class CopyErrorReadOnly extends CopyErrorReadOnly_base {
21
+ }
22
+ declare const CopyErrorInvalidArgument_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-invalid-argument", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-invalid-argument", unknown>>, unknown>;
23
+ export declare class CopyErrorInvalidArgument extends CopyErrorInvalidArgument_base {
24
+ }
25
+ declare const CopyErrorTooManyOpenFiles_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-too-many-open-files", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-too-many-open-files", unknown>>, unknown>;
26
+ export declare class CopyErrorTooManyOpenFiles extends CopyErrorTooManyOpenFiles_base {
27
+ }
28
+ declare const CopyErrorBusy_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-busy", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-busy", unknown>>, unknown>;
29
+ export declare class CopyErrorBusy extends CopyErrorBusy_base {
30
+ }
31
+ declare const CopyError_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-copy-error", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-copy-error", unknown>>, unknown>;
32
+ export declare class CopyError extends CopyError_base {
33
+ }
34
+ export type CopyErrors = (CopyErrorNotFound | CopyErrorPermissionDenied | CopyErrorAlreadyExists | CopyErrorNotDirectory | CopyErrorNoSpace | CopyErrorReadOnly | CopyErrorInvalidArgument | CopyErrorTooManyOpenFiles | CopyErrorBusy | CopyError);
35
+ export type CopyResult = (DEither.Right<"file-system-copy", void> | DEither.Left<"file-system-copy-error", CopyErrors>);
36
+ declare module '../implementor' {
37
+ interface ServerFunction {
38
+ copy(fromPath: DPath.AnyPath, toPath: DPath.AnyPath): Promise<CopyResult>;
39
+ }
40
+ }
41
+ export declare function copy(toPath: DPath.AnyPath): (fromPath: DPath.AnyPath) => Promise<CopyResult>;
42
+ export declare function copy(fromPath: DPath.AnyPath, toPath: DPath.AnyPath): Promise<CopyResult>;
43
+ export {};
@@ -0,0 +1,40 @@
1
+ import { implementFunction, nodeFileSystem } from "../implementor.mjs";
2
+ import * as DCommon from "@duplojs/lang/common";
3
+ import * as DEither from "@duplojs/lang/either";
4
+ //#region scripts/file/copy.ts
5
+ var CopyErrorNotFound = class extends DCommon.DuploJSError.parentClass("file-system-copy-not-found", Error) {};
6
+ var CopyErrorPermissionDenied = class extends DCommon.DuploJSError.parentClass("file-system-copy-permission-denied", Error) {};
7
+ var CopyErrorAlreadyExists = class extends DCommon.DuploJSError.parentClass("file-system-copy-already-exists", Error) {};
8
+ var CopyErrorNotDirectory = class extends DCommon.DuploJSError.parentClass("file-system-copy-not-directory", Error) {};
9
+ var CopyErrorNoSpace = class extends DCommon.DuploJSError.parentClass("file-system-copy-no-space", Error) {};
10
+ var CopyErrorReadOnly = class extends DCommon.DuploJSError.parentClass("file-system-copy-read-only", Error) {};
11
+ var CopyErrorInvalidArgument = class extends DCommon.DuploJSError.parentClass("file-system-copy-invalid-argument", Error) {};
12
+ var CopyErrorTooManyOpenFiles = class extends DCommon.DuploJSError.parentClass("file-system-copy-too-many-open-files", Error) {};
13
+ var CopyErrorBusy = class extends DCommon.DuploJSError.parentClass("file-system-copy-busy", Error) {};
14
+ var CopyError = class extends DCommon.DuploJSError.parentClass("file-system-copy-error", Error) {};
15
+ function handleNodeCopyError(error) {
16
+ let copyError = void 0;
17
+ if ("code" in error) {
18
+ if (error.code === "ENOENT") copyError = new CopyErrorNotFound(error);
19
+ else if (error.code === "EACCES" || error.code === "EPERM") copyError = new CopyErrorPermissionDenied(error);
20
+ else if (error.code === "EEXIST") copyError = new CopyErrorAlreadyExists(error);
21
+ else if (error.code === "ENOTDIR") copyError = new CopyErrorNotDirectory(error);
22
+ else if (error.code === "ENOSPC") copyError = new CopyErrorNoSpace(error);
23
+ else if (error.code === "EROFS") copyError = new CopyErrorReadOnly(error);
24
+ else if (error.code === "EINVAL") copyError = new CopyErrorInvalidArgument(error);
25
+ else if (error.code === "EMFILE" || error.code === "ENFILE") copyError = new CopyErrorTooManyOpenFiles(error);
26
+ else if (error.code === "EBUSY") copyError = new CopyErrorBusy(error);
27
+ }
28
+ if (copyError === void 0) copyError = new CopyError(error);
29
+ return DEither.left("file-system-copy-error", copyError);
30
+ }
31
+ const copyImplementation = implementFunction("copy", { NODE: async (fromPath, toPath) => nodeFileSystem.value.cp(fromPath, toPath, { recursive: true }).then(() => DEither.right("file-system-copy")).catch(handleNodeCopyError) });
32
+ function copy(...args) {
33
+ if (args.length === 1) {
34
+ const [toPath] = args;
35
+ return (fromPath) => copyImplementation(fromPath, toPath);
36
+ }
37
+ return copyImplementation(...args);
38
+ }
39
+ //#endregion
40
+ export { CopyError, CopyErrorAlreadyExists, CopyErrorBusy, CopyErrorInvalidArgument, CopyErrorNoSpace, CopyErrorNotDirectory, CopyErrorNotFound, CopyErrorPermissionDenied, CopyErrorReadOnly, CopyErrorTooManyOpenFiles, copy };
@@ -0,0 +1,19 @@
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_stat = require("./stat.cjs");
3
+ const require_fileInterface = require("./fileInterface.cjs");
4
+ const require_unknownEntryInterface = require("./unknownEntryInterface.cjs");
5
+ const require_folderInterface = require("./folderInterface.cjs");
6
+ let _duplojs_lang_common = require("@duplojs/lang/common");
7
+ _duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
8
+ let _duplojs_lang_pattern = require("@duplojs/lang/pattern");
9
+ _duplojs_lang_pattern = require_runtime.__toESM(_duplojs_lang_pattern, 1);
10
+ let _duplojs_lang_either = require("@duplojs/lang/either");
11
+ _duplojs_lang_either = require_runtime.__toESM(_duplojs_lang_either, 1);
12
+ //#region scripts/file/createEntryInterface.ts
13
+ async function createEntryInterface(path) {
14
+ const entryPath = _duplojs_lang_common.cast(path);
15
+ const result = await _duplojs_lang_either.rightAsyncPipe(require_stat.stat(path), _duplojs_lang_pattern.when(({ isFile }) => isFile, () => _duplojs_lang_either.right("file-interface", require_fileInterface.createFileInterface(entryPath))), _duplojs_lang_pattern.when(({ isDirectory }) => isDirectory, () => _duplojs_lang_either.right("folder-interface", require_folderInterface.createFolderInterface(entryPath))), _duplojs_lang_pattern.otherwise(() => _duplojs_lang_either.right("unknown-entry-interface", require_unknownEntryInterface.createUnknownEntryInterface(entryPath))));
16
+ return _duplojs_lang_either.whenIsLeft(result, (value) => _duplojs_lang_either.left("create-entry-interface-error", value));
17
+ }
18
+ //#endregion
19
+ exports.createEntryInterface = createEntryInterface;
@@ -0,0 +1,3 @@
1
+ import type * as DPath from "@duplojs/lang/path";
2
+ import * as DEither from "@duplojs/lang/either";
3
+ export declare function createEntryInterface(path: DPath.AnyPath): Promise<DEither.Right<"file-interface", import('./fileInterface').FileInterface<string & DPath.Path>> | DEither.Right<"folder-interface", import('./folderInterface').FolderInterface<string & DPath.Path>> | DEither.Right<"unknown-entry-interface", import('./unknownEntryInterface').UnknownEntryInterface<string & DPath.Path>> | DEither.Left<"create-entry-interface-error", import('./stat').StatErrors>>;
@@ -0,0 +1,15 @@
1
+ import { stat } from "./stat.mjs";
2
+ import { createFileInterface } from "./fileInterface.mjs";
3
+ import { createUnknownEntryInterface } from "./unknownEntryInterface.mjs";
4
+ import { createFolderInterface } from "./folderInterface.mjs";
5
+ import * as DCommon from "@duplojs/lang/common";
6
+ import * as DPattern from "@duplojs/lang/pattern";
7
+ import * as DEither from "@duplojs/lang/either";
8
+ //#region scripts/file/createEntryInterface.ts
9
+ async function createEntryInterface(path) {
10
+ const entryPath = DCommon.cast(path);
11
+ const result = await DEither.rightAsyncPipe(stat(path), DPattern.when(({ isFile }) => isFile, () => DEither.right("file-interface", createFileInterface(entryPath))), DPattern.when(({ isDirectory }) => isDirectory, () => DEither.right("folder-interface", createFolderInterface(entryPath))), DPattern.otherwise(() => DEither.right("unknown-entry-interface", createUnknownEntryInterface(entryPath))));
12
+ return DEither.whenIsLeft(result, (value) => DEither.left("create-entry-interface-error", value));
13
+ }
14
+ //#endregion
15
+ export { createEntryInterface };
@@ -0,0 +1,52 @@
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_implementor = require("../implementor.cjs");
3
+ let _duplojs_lang_common = require("@duplojs/lang/common");
4
+ _duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
5
+ let _duplojs_lang_either = require("@duplojs/lang/either");
6
+ _duplojs_lang_either = require_runtime.__toESM(_duplojs_lang_either, 1);
7
+ //#region scripts/file/ensureDirectory.ts
8
+ var EnsureDirectoryErrorPermissionDenied = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-permission-denied", Error) {};
9
+ var EnsureDirectoryErrorNotDirectory = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-not-directory", Error) {};
10
+ var EnsureDirectoryErrorNoSpace = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-no-space", Error) {};
11
+ var EnsureDirectoryErrorReadOnly = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-read-only", Error) {};
12
+ var EnsureDirectoryErrorInvalidArgument = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-invalid-argument", Error) {};
13
+ var EnsureDirectoryErrorTooManyOpenFiles = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-too-many-open-files", Error) {};
14
+ var EnsureDirectoryErrorBusy = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-busy", Error) {};
15
+ var EnsureDirectoryError = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-directory-error", Error) {};
16
+ function handleNodeEnsureDirectoryError(error) {
17
+ let ensureDirectoryError = void 0;
18
+ if ("code" in error) {
19
+ if (error.code === "EACCES" || error.code === "EPERM") ensureDirectoryError = new EnsureDirectoryErrorPermissionDenied(error);
20
+ else if (error.code === "ENOTDIR") ensureDirectoryError = new EnsureDirectoryErrorNotDirectory(error);
21
+ else if (error.code === "ENOSPC") ensureDirectoryError = new EnsureDirectoryErrorNoSpace(error);
22
+ else if (error.code === "EROFS") ensureDirectoryError = new EnsureDirectoryErrorReadOnly(error);
23
+ else if (error.code === "EINVAL") ensureDirectoryError = new EnsureDirectoryErrorInvalidArgument(error);
24
+ else if (error.code === "EMFILE" || error.code === "ENFILE") ensureDirectoryError = new EnsureDirectoryErrorTooManyOpenFiles(error);
25
+ else if (error.code === "EBUSY") ensureDirectoryError = new EnsureDirectoryErrorBusy(error);
26
+ }
27
+ if (ensureDirectoryError === void 0) ensureDirectoryError = new EnsureDirectoryError(error);
28
+ return _duplojs_lang_either.left("file-system-ensure-directory-error", ensureDirectoryError);
29
+ }
30
+ function handleDenoEnsureDirectoryError(error) {
31
+ let ensureDirectoryError = void 0;
32
+ if (error instanceof Deno.errors.PermissionDenied || error instanceof Deno.errors.NotCapable) ensureDirectoryError = new EnsureDirectoryErrorPermissionDenied(error);
33
+ else if (error instanceof Deno.errors.NotADirectory) ensureDirectoryError = new EnsureDirectoryErrorNotDirectory(error);
34
+ else if (error instanceof Deno.errors.InvalidData) ensureDirectoryError = new EnsureDirectoryErrorInvalidArgument(error);
35
+ else if (error instanceof Deno.errors.Busy) ensureDirectoryError = new EnsureDirectoryErrorBusy(error);
36
+ if (ensureDirectoryError === void 0) ensureDirectoryError = new EnsureDirectoryError(error);
37
+ return _duplojs_lang_either.left("file-system-ensure-directory-error", ensureDirectoryError);
38
+ }
39
+ const ensureDirectory = require_implementor.implementFunction("ensureDirectory", {
40
+ NODE: async (path) => require_implementor.nodeFileSystem.value.mkdir(path, { recursive: true }).then(() => _duplojs_lang_either.right("file-system-ensure-directory")).catch(handleNodeEnsureDirectoryError),
41
+ DENO: (path) => Deno.mkdir(path, { recursive: true }).then(() => _duplojs_lang_either.right("file-system-ensure-directory")).catch(handleDenoEnsureDirectoryError)
42
+ });
43
+ //#endregion
44
+ exports.EnsureDirectoryError = EnsureDirectoryError;
45
+ exports.EnsureDirectoryErrorBusy = EnsureDirectoryErrorBusy;
46
+ exports.EnsureDirectoryErrorInvalidArgument = EnsureDirectoryErrorInvalidArgument;
47
+ exports.EnsureDirectoryErrorNoSpace = EnsureDirectoryErrorNoSpace;
48
+ exports.EnsureDirectoryErrorNotDirectory = EnsureDirectoryErrorNotDirectory;
49
+ exports.EnsureDirectoryErrorPermissionDenied = EnsureDirectoryErrorPermissionDenied;
50
+ exports.EnsureDirectoryErrorReadOnly = EnsureDirectoryErrorReadOnly;
51
+ exports.EnsureDirectoryErrorTooManyOpenFiles = EnsureDirectoryErrorTooManyOpenFiles;
52
+ exports.ensureDirectory = ensureDirectory;
@@ -0,0 +1,36 @@
1
+ import * as DEither from "@duplojs/lang/either";
2
+ import type * as DPath from "@duplojs/lang/path";
3
+ import * as DCommon from "@duplojs/lang/common";
4
+ declare const EnsureDirectoryErrorPermissionDenied_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-permission-denied", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-permission-denied", unknown>>, unknown>;
5
+ export declare class EnsureDirectoryErrorPermissionDenied extends EnsureDirectoryErrorPermissionDenied_base {
6
+ }
7
+ declare const EnsureDirectoryErrorNotDirectory_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-not-directory", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-not-directory", unknown>>, unknown>;
8
+ export declare class EnsureDirectoryErrorNotDirectory extends EnsureDirectoryErrorNotDirectory_base {
9
+ }
10
+ declare const EnsureDirectoryErrorNoSpace_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-no-space", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-no-space", unknown>>, unknown>;
11
+ export declare class EnsureDirectoryErrorNoSpace extends EnsureDirectoryErrorNoSpace_base {
12
+ }
13
+ declare const EnsureDirectoryErrorReadOnly_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-read-only", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-read-only", unknown>>, unknown>;
14
+ export declare class EnsureDirectoryErrorReadOnly extends EnsureDirectoryErrorReadOnly_base {
15
+ }
16
+ declare const EnsureDirectoryErrorInvalidArgument_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-invalid-argument", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-invalid-argument", unknown>>, unknown>;
17
+ export declare class EnsureDirectoryErrorInvalidArgument extends EnsureDirectoryErrorInvalidArgument_base {
18
+ }
19
+ declare const EnsureDirectoryErrorTooManyOpenFiles_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-too-many-open-files", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-too-many-open-files", unknown>>, unknown>;
20
+ export declare class EnsureDirectoryErrorTooManyOpenFiles extends EnsureDirectoryErrorTooManyOpenFiles_base {
21
+ }
22
+ declare const EnsureDirectoryErrorBusy_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-busy", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-busy", unknown>>, unknown>;
23
+ export declare class EnsureDirectoryErrorBusy extends EnsureDirectoryErrorBusy_base {
24
+ }
25
+ declare const EnsureDirectoryError_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-directory-error", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-directory-error", unknown>>, unknown>;
26
+ export declare class EnsureDirectoryError extends EnsureDirectoryError_base {
27
+ }
28
+ export type EnsureDirectoryErrors = (EnsureDirectoryErrorPermissionDenied | EnsureDirectoryErrorNotDirectory | EnsureDirectoryErrorNoSpace | EnsureDirectoryErrorReadOnly | EnsureDirectoryErrorInvalidArgument | EnsureDirectoryErrorTooManyOpenFiles | EnsureDirectoryErrorBusy | EnsureDirectoryError);
29
+ export type EnsureDirectoryResult = (DEither.Right<"file-system-ensure-directory", void> | DEither.Left<"file-system-ensure-directory-error", EnsureDirectoryErrors>);
30
+ declare module '../implementor' {
31
+ interface ServerFunction {
32
+ ensureDirectory(path: DPath.AnyPath): Promise<EnsureDirectoryResult>;
33
+ }
34
+ }
35
+ export declare const ensureDirectory: (path: DPath.AnyPath) => Promise<EnsureDirectoryResult>;
36
+ export {};
@@ -0,0 +1,41 @@
1
+ import { implementFunction, nodeFileSystem } from "../implementor.mjs";
2
+ import * as DCommon from "@duplojs/lang/common";
3
+ import * as DEither from "@duplojs/lang/either";
4
+ //#region scripts/file/ensureDirectory.ts
5
+ var EnsureDirectoryErrorPermissionDenied = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-permission-denied", Error) {};
6
+ var EnsureDirectoryErrorNotDirectory = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-not-directory", Error) {};
7
+ var EnsureDirectoryErrorNoSpace = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-no-space", Error) {};
8
+ var EnsureDirectoryErrorReadOnly = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-read-only", Error) {};
9
+ var EnsureDirectoryErrorInvalidArgument = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-invalid-argument", Error) {};
10
+ var EnsureDirectoryErrorTooManyOpenFiles = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-too-many-open-files", Error) {};
11
+ var EnsureDirectoryErrorBusy = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-busy", Error) {};
12
+ var EnsureDirectoryError = class extends DCommon.DuploJSError.parentClass("file-system-ensure-directory-error", Error) {};
13
+ function handleNodeEnsureDirectoryError(error) {
14
+ let ensureDirectoryError = void 0;
15
+ if ("code" in error) {
16
+ if (error.code === "EACCES" || error.code === "EPERM") ensureDirectoryError = new EnsureDirectoryErrorPermissionDenied(error);
17
+ else if (error.code === "ENOTDIR") ensureDirectoryError = new EnsureDirectoryErrorNotDirectory(error);
18
+ else if (error.code === "ENOSPC") ensureDirectoryError = new EnsureDirectoryErrorNoSpace(error);
19
+ else if (error.code === "EROFS") ensureDirectoryError = new EnsureDirectoryErrorReadOnly(error);
20
+ else if (error.code === "EINVAL") ensureDirectoryError = new EnsureDirectoryErrorInvalidArgument(error);
21
+ else if (error.code === "EMFILE" || error.code === "ENFILE") ensureDirectoryError = new EnsureDirectoryErrorTooManyOpenFiles(error);
22
+ else if (error.code === "EBUSY") ensureDirectoryError = new EnsureDirectoryErrorBusy(error);
23
+ }
24
+ if (ensureDirectoryError === void 0) ensureDirectoryError = new EnsureDirectoryError(error);
25
+ return DEither.left("file-system-ensure-directory-error", ensureDirectoryError);
26
+ }
27
+ function handleDenoEnsureDirectoryError(error) {
28
+ let ensureDirectoryError = void 0;
29
+ if (error instanceof Deno.errors.PermissionDenied || error instanceof Deno.errors.NotCapable) ensureDirectoryError = new EnsureDirectoryErrorPermissionDenied(error);
30
+ else if (error instanceof Deno.errors.NotADirectory) ensureDirectoryError = new EnsureDirectoryErrorNotDirectory(error);
31
+ else if (error instanceof Deno.errors.InvalidData) ensureDirectoryError = new EnsureDirectoryErrorInvalidArgument(error);
32
+ else if (error instanceof Deno.errors.Busy) ensureDirectoryError = new EnsureDirectoryErrorBusy(error);
33
+ if (ensureDirectoryError === void 0) ensureDirectoryError = new EnsureDirectoryError(error);
34
+ return DEither.left("file-system-ensure-directory-error", ensureDirectoryError);
35
+ }
36
+ const ensureDirectory = implementFunction("ensureDirectory", {
37
+ NODE: async (path) => nodeFileSystem.value.mkdir(path, { recursive: true }).then(() => DEither.right("file-system-ensure-directory")).catch(handleNodeEnsureDirectoryError),
38
+ DENO: (path) => Deno.mkdir(path, { recursive: true }).then(() => DEither.right("file-system-ensure-directory")).catch(handleDenoEnsureDirectoryError)
39
+ });
40
+ //#endregion
41
+ export { EnsureDirectoryError, EnsureDirectoryErrorBusy, EnsureDirectoryErrorInvalidArgument, EnsureDirectoryErrorNoSpace, EnsureDirectoryErrorNotDirectory, EnsureDirectoryErrorPermissionDenied, EnsureDirectoryErrorReadOnly, EnsureDirectoryErrorTooManyOpenFiles, ensureDirectory };
@@ -0,0 +1,60 @@
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_implementor = require("../implementor.cjs");
3
+ let _duplojs_lang_common = require("@duplojs/lang/common");
4
+ _duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
5
+ let _duplojs_lang_either = require("@duplojs/lang/either");
6
+ _duplojs_lang_either = require_runtime.__toESM(_duplojs_lang_either, 1);
7
+ //#region scripts/file/ensureFile.ts
8
+ var EnsureFileErrorPermissionDenied = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-permission-denied", Error) {};
9
+ var EnsureFileErrorIsDirectory = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-is-directory", Error) {};
10
+ var EnsureFileErrorNotDirectory = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-not-directory", Error) {};
11
+ var EnsureFileErrorNoSpace = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-no-space", Error) {};
12
+ var EnsureFileErrorReadOnly = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-read-only", Error) {};
13
+ var EnsureFileErrorInvalidArgument = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-invalid-argument", Error) {};
14
+ var EnsureFileErrorTooManyOpenFiles = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-too-many-open-files", Error) {};
15
+ var EnsureFileErrorBusy = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-busy", Error) {};
16
+ var EnsureFileError = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-ensure-file-error", Error) {};
17
+ function handleNodeEnsureFileError(error) {
18
+ let ensureFileError = void 0;
19
+ if ("code" in error) {
20
+ if (error.code === "EACCES" || error.code === "EPERM") ensureFileError = new EnsureFileErrorPermissionDenied(error);
21
+ else if (error.code === "EISDIR") ensureFileError = new EnsureFileErrorIsDirectory(error);
22
+ else if (error.code === "ENOTDIR") ensureFileError = new EnsureFileErrorNotDirectory(error);
23
+ else if (error.code === "ENOSPC") ensureFileError = new EnsureFileErrorNoSpace(error);
24
+ else if (error.code === "EROFS") ensureFileError = new EnsureFileErrorReadOnly(error);
25
+ else if (error.code === "EINVAL") ensureFileError = new EnsureFileErrorInvalidArgument(error);
26
+ else if (error.code === "EMFILE" || error.code === "ENFILE") ensureFileError = new EnsureFileErrorTooManyOpenFiles(error);
27
+ else if (error.code === "EBUSY") ensureFileError = new EnsureFileErrorBusy(error);
28
+ }
29
+ if (ensureFileError === void 0) ensureFileError = new EnsureFileError(error);
30
+ return _duplojs_lang_either.left("file-system-ensure-file-error", ensureFileError);
31
+ }
32
+ function handleDenoEnsureFileError(error) {
33
+ let ensureFileError = void 0;
34
+ if (error instanceof Deno.errors.PermissionDenied || error instanceof Deno.errors.NotCapable) ensureFileError = new EnsureFileErrorPermissionDenied(error);
35
+ else if (error instanceof Deno.errors.IsADirectory) ensureFileError = new EnsureFileErrorIsDirectory(error);
36
+ else if (error instanceof Deno.errors.NotADirectory) ensureFileError = new EnsureFileErrorNotDirectory(error);
37
+ else if (error instanceof Deno.errors.InvalidData) ensureFileError = new EnsureFileErrorInvalidArgument(error);
38
+ else if (error instanceof Deno.errors.Busy) ensureFileError = new EnsureFileErrorBusy(error);
39
+ if (ensureFileError === void 0) ensureFileError = new EnsureFileError(error);
40
+ return _duplojs_lang_either.left("file-system-ensure-file-error", ensureFileError);
41
+ }
42
+ const ensureFile = require_implementor.implementFunction("ensureFile", {
43
+ NODE: async (path) => require_implementor.nodeFileSystem.value.open(path, "a").then((fh) => fh.close()).then(() => _duplojs_lang_either.right("file-system-ensure-file")).catch(handleNodeEnsureFileError),
44
+ DENO: (path) => Deno.open(path, {
45
+ write: true,
46
+ create: true,
47
+ append: true
48
+ }).then((fh) => void fh.close()).then(() => _duplojs_lang_either.right("file-system-ensure-file")).catch(handleDenoEnsureFileError)
49
+ });
50
+ //#endregion
51
+ exports.EnsureFileError = EnsureFileError;
52
+ exports.EnsureFileErrorBusy = EnsureFileErrorBusy;
53
+ exports.EnsureFileErrorInvalidArgument = EnsureFileErrorInvalidArgument;
54
+ exports.EnsureFileErrorIsDirectory = EnsureFileErrorIsDirectory;
55
+ exports.EnsureFileErrorNoSpace = EnsureFileErrorNoSpace;
56
+ exports.EnsureFileErrorNotDirectory = EnsureFileErrorNotDirectory;
57
+ exports.EnsureFileErrorPermissionDenied = EnsureFileErrorPermissionDenied;
58
+ exports.EnsureFileErrorReadOnly = EnsureFileErrorReadOnly;
59
+ exports.EnsureFileErrorTooManyOpenFiles = EnsureFileErrorTooManyOpenFiles;
60
+ exports.ensureFile = ensureFile;
@@ -0,0 +1,39 @@
1
+ import * as DEither from "@duplojs/lang/either";
2
+ import type * as DPath from "@duplojs/lang/path";
3
+ import * as DCommon from "@duplojs/lang/common";
4
+ declare const EnsureFileErrorPermissionDenied_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-permission-denied", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-permission-denied", unknown>>, unknown>;
5
+ export declare class EnsureFileErrorPermissionDenied extends EnsureFileErrorPermissionDenied_base {
6
+ }
7
+ declare const EnsureFileErrorIsDirectory_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-is-directory", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-is-directory", unknown>>, unknown>;
8
+ export declare class EnsureFileErrorIsDirectory extends EnsureFileErrorIsDirectory_base {
9
+ }
10
+ declare const EnsureFileErrorNotDirectory_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-not-directory", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-not-directory", unknown>>, unknown>;
11
+ export declare class EnsureFileErrorNotDirectory extends EnsureFileErrorNotDirectory_base {
12
+ }
13
+ declare const EnsureFileErrorNoSpace_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-no-space", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-no-space", unknown>>, unknown>;
14
+ export declare class EnsureFileErrorNoSpace extends EnsureFileErrorNoSpace_base {
15
+ }
16
+ declare const EnsureFileErrorReadOnly_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-read-only", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-read-only", unknown>>, unknown>;
17
+ export declare class EnsureFileErrorReadOnly extends EnsureFileErrorReadOnly_base {
18
+ }
19
+ declare const EnsureFileErrorInvalidArgument_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-invalid-argument", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-invalid-argument", unknown>>, unknown>;
20
+ export declare class EnsureFileErrorInvalidArgument extends EnsureFileErrorInvalidArgument_base {
21
+ }
22
+ declare const EnsureFileErrorTooManyOpenFiles_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-too-many-open-files", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-too-many-open-files", unknown>>, unknown>;
23
+ export declare class EnsureFileErrorTooManyOpenFiles extends EnsureFileErrorTooManyOpenFiles_base {
24
+ }
25
+ declare const EnsureFileErrorBusy_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-busy", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-busy", unknown>>, unknown>;
26
+ export declare class EnsureFileErrorBusy extends EnsureFileErrorBusy_base {
27
+ }
28
+ declare const EnsureFileError_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-ensure-file-error", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-ensure-file-error", unknown>>, unknown>;
29
+ export declare class EnsureFileError extends EnsureFileError_base {
30
+ }
31
+ export type EnsureFileErrors = (EnsureFileErrorPermissionDenied | EnsureFileErrorIsDirectory | EnsureFileErrorNotDirectory | EnsureFileErrorNoSpace | EnsureFileErrorReadOnly | EnsureFileErrorInvalidArgument | EnsureFileErrorTooManyOpenFiles | EnsureFileErrorBusy | EnsureFileError);
32
+ export type EnsureFileResult = (DEither.Right<"file-system-ensure-file", void> | DEither.Left<"file-system-ensure-file-error", EnsureFileErrors>);
33
+ declare module '../implementor' {
34
+ interface ServerFunction {
35
+ ensureFile(path: DPath.AnyPath): Promise<EnsureFileResult>;
36
+ }
37
+ }
38
+ export declare const ensureFile: (path: DPath.AnyPath) => Promise<EnsureFileResult>;
39
+ export {};
@@ -0,0 +1,48 @@
1
+ import { implementFunction, nodeFileSystem } from "../implementor.mjs";
2
+ import * as DCommon from "@duplojs/lang/common";
3
+ import * as DEither from "@duplojs/lang/either";
4
+ //#region scripts/file/ensureFile.ts
5
+ var EnsureFileErrorPermissionDenied = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-permission-denied", Error) {};
6
+ var EnsureFileErrorIsDirectory = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-is-directory", Error) {};
7
+ var EnsureFileErrorNotDirectory = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-not-directory", Error) {};
8
+ var EnsureFileErrorNoSpace = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-no-space", Error) {};
9
+ var EnsureFileErrorReadOnly = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-read-only", Error) {};
10
+ var EnsureFileErrorInvalidArgument = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-invalid-argument", Error) {};
11
+ var EnsureFileErrorTooManyOpenFiles = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-too-many-open-files", Error) {};
12
+ var EnsureFileErrorBusy = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-busy", Error) {};
13
+ var EnsureFileError = class extends DCommon.DuploJSError.parentClass("file-system-ensure-file-error", Error) {};
14
+ function handleNodeEnsureFileError(error) {
15
+ let ensureFileError = void 0;
16
+ if ("code" in error) {
17
+ if (error.code === "EACCES" || error.code === "EPERM") ensureFileError = new EnsureFileErrorPermissionDenied(error);
18
+ else if (error.code === "EISDIR") ensureFileError = new EnsureFileErrorIsDirectory(error);
19
+ else if (error.code === "ENOTDIR") ensureFileError = new EnsureFileErrorNotDirectory(error);
20
+ else if (error.code === "ENOSPC") ensureFileError = new EnsureFileErrorNoSpace(error);
21
+ else if (error.code === "EROFS") ensureFileError = new EnsureFileErrorReadOnly(error);
22
+ else if (error.code === "EINVAL") ensureFileError = new EnsureFileErrorInvalidArgument(error);
23
+ else if (error.code === "EMFILE" || error.code === "ENFILE") ensureFileError = new EnsureFileErrorTooManyOpenFiles(error);
24
+ else if (error.code === "EBUSY") ensureFileError = new EnsureFileErrorBusy(error);
25
+ }
26
+ if (ensureFileError === void 0) ensureFileError = new EnsureFileError(error);
27
+ return DEither.left("file-system-ensure-file-error", ensureFileError);
28
+ }
29
+ function handleDenoEnsureFileError(error) {
30
+ let ensureFileError = void 0;
31
+ if (error instanceof Deno.errors.PermissionDenied || error instanceof Deno.errors.NotCapable) ensureFileError = new EnsureFileErrorPermissionDenied(error);
32
+ else if (error instanceof Deno.errors.IsADirectory) ensureFileError = new EnsureFileErrorIsDirectory(error);
33
+ else if (error instanceof Deno.errors.NotADirectory) ensureFileError = new EnsureFileErrorNotDirectory(error);
34
+ else if (error instanceof Deno.errors.InvalidData) ensureFileError = new EnsureFileErrorInvalidArgument(error);
35
+ else if (error instanceof Deno.errors.Busy) ensureFileError = new EnsureFileErrorBusy(error);
36
+ if (ensureFileError === void 0) ensureFileError = new EnsureFileError(error);
37
+ return DEither.left("file-system-ensure-file-error", ensureFileError);
38
+ }
39
+ const ensureFile = implementFunction("ensureFile", {
40
+ NODE: async (path) => nodeFileSystem.value.open(path, "a").then((fh) => fh.close()).then(() => DEither.right("file-system-ensure-file")).catch(handleNodeEnsureFileError),
41
+ DENO: (path) => Deno.open(path, {
42
+ write: true,
43
+ create: true,
44
+ append: true
45
+ }).then((fh) => void fh.close()).then(() => DEither.right("file-system-ensure-file")).catch(handleDenoEnsureFileError)
46
+ });
47
+ //#endregion
48
+ export { EnsureFileError, EnsureFileErrorBusy, EnsureFileErrorInvalidArgument, EnsureFileErrorIsDirectory, EnsureFileErrorNoSpace, EnsureFileErrorNotDirectory, EnsureFileErrorPermissionDenied, EnsureFileErrorReadOnly, EnsureFileErrorTooManyOpenFiles, ensureFile };
@@ -0,0 +1,43 @@
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_implementor = require("../implementor.cjs");
3
+ let _duplojs_lang_common = require("@duplojs/lang/common");
4
+ _duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
5
+ let _duplojs_lang_either = require("@duplojs/lang/either");
6
+ _duplojs_lang_either = require_runtime.__toESM(_duplojs_lang_either, 1);
7
+ //#region scripts/file/exists.ts
8
+ var ExistsErrorNotFound = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-exists-not-found", Error) {};
9
+ var ExistsErrorPermissionDenied = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-exists-permission-denied", Error) {};
10
+ var ExistsErrorNotDirectory = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-exists-not-directory", Error) {};
11
+ var ExistsErrorTooManyOpenFiles = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-exists-too-many-open-files", Error) {};
12
+ var ExistsError = class extends _duplojs_lang_common.DuploJSError.parentClass("file-system-exists-error", Error) {};
13
+ function handleNodeExistsError(error) {
14
+ let existsError = void 0;
15
+ if ("code" in error) {
16
+ if (error.code === "ENOENT") existsError = new ExistsErrorNotFound(error);
17
+ else if (error.code === "EACCES" || error.code === "EPERM") existsError = new ExistsErrorPermissionDenied(error);
18
+ else if (error.code === "ENOTDIR") existsError = new ExistsErrorNotDirectory(error);
19
+ else if (error.code === "EMFILE" || error.code === "ENFILE") existsError = new ExistsErrorTooManyOpenFiles(error);
20
+ }
21
+ if (existsError === void 0) existsError = new ExistsError(error);
22
+ return _duplojs_lang_either.left("file-system-exists-error", existsError);
23
+ }
24
+ function handleDenoExistsError(error) {
25
+ let existsError = void 0;
26
+ if (error instanceof Deno.errors.NotFound) existsError = new ExistsErrorNotFound(error);
27
+ else if (error instanceof Deno.errors.PermissionDenied || error instanceof Deno.errors.NotCapable) existsError = new ExistsErrorPermissionDenied(error);
28
+ else if (error instanceof Deno.errors.NotADirectory) existsError = new ExistsErrorNotDirectory(error);
29
+ if (existsError === void 0) existsError = new ExistsError(error);
30
+ return _duplojs_lang_either.left("file-system-exists-error", existsError);
31
+ }
32
+ const exists = require_implementor.implementFunction("exists", {
33
+ NODE: async (path) => require_implementor.nodeFileSystem.value.access(path).then(() => _duplojs_lang_either.right("file-system-exists")).catch(handleNodeExistsError),
34
+ DENO: (path) => Deno.stat(path).then(() => _duplojs_lang_either.right("file-system-exists")).catch(handleDenoExistsError),
35
+ BUN: (path) => Bun.file(path).exists().then((value) => value ? _duplojs_lang_either.right("file-system-exists") : _duplojs_lang_either.left("file-system-exists-error", new ExistsErrorNotFound(/* @__PURE__ */ new Error("Path does not exist")))).catch(handleNodeExistsError)
36
+ });
37
+ //#endregion
38
+ exports.ExistsError = ExistsError;
39
+ exports.ExistsErrorNotDirectory = ExistsErrorNotDirectory;
40
+ exports.ExistsErrorNotFound = ExistsErrorNotFound;
41
+ exports.ExistsErrorPermissionDenied = ExistsErrorPermissionDenied;
42
+ exports.ExistsErrorTooManyOpenFiles = ExistsErrorTooManyOpenFiles;
43
+ exports.exists = exists;
@@ -0,0 +1,27 @@
1
+ import * as DEither from "@duplojs/lang/either";
2
+ import type * as DPath from "@duplojs/lang/path";
3
+ import * as DCommon from "@duplojs/lang/common";
4
+ declare const ExistsErrorNotFound_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-exists-not-found", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-exists-not-found", unknown>>, unknown>;
5
+ export declare class ExistsErrorNotFound extends ExistsErrorNotFound_base {
6
+ }
7
+ declare const ExistsErrorPermissionDenied_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-exists-permission-denied", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-exists-permission-denied", unknown>>, unknown>;
8
+ export declare class ExistsErrorPermissionDenied extends ExistsErrorPermissionDenied_base {
9
+ }
10
+ declare const ExistsErrorNotDirectory_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-exists-not-directory", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-exists-not-directory", unknown>>, unknown>;
11
+ export declare class ExistsErrorNotDirectory extends ExistsErrorNotDirectory_base {
12
+ }
13
+ declare const ExistsErrorTooManyOpenFiles_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-exists-too-many-open-files", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-exists-too-many-open-files", unknown>>, unknown>;
14
+ export declare class ExistsErrorTooManyOpenFiles extends ExistsErrorTooManyOpenFiles_base {
15
+ }
16
+ declare const ExistsError_base: abstract new (error: Error) => DCommon.DuploJSError<"file-system-exists-error", Error> & import('@duplojs/lang/kind').Kind<import('@duplojs/lang/kind').Handler<import('@duplojs/lang/kind').Definition<"@DuplojsLangCommon/duplojs-error-file-system-exists-error", unknown>>, unknown>;
17
+ export declare class ExistsError extends ExistsError_base {
18
+ }
19
+ export type ExistsErrors = (ExistsErrorNotFound | ExistsErrorPermissionDenied | ExistsErrorNotDirectory | ExistsErrorTooManyOpenFiles | ExistsError);
20
+ export type ExistsResult = (DEither.Right<"file-system-exists", void> | DEither.Left<"file-system-exists-error", ExistsErrors>);
21
+ declare module '../implementor' {
22
+ interface ServerFunction {
23
+ exists(path: DPath.AnyPath): Promise<ExistsResult>;
24
+ }
25
+ }
26
+ export declare const exists: (path: DPath.AnyPath) => Promise<ExistsResult>;
27
+ export {};
@@ -0,0 +1,35 @@
1
+ import { implementFunction, nodeFileSystem } from "../implementor.mjs";
2
+ import * as DCommon from "@duplojs/lang/common";
3
+ import * as DEither from "@duplojs/lang/either";
4
+ //#region scripts/file/exists.ts
5
+ var ExistsErrorNotFound = class extends DCommon.DuploJSError.parentClass("file-system-exists-not-found", Error) {};
6
+ var ExistsErrorPermissionDenied = class extends DCommon.DuploJSError.parentClass("file-system-exists-permission-denied", Error) {};
7
+ var ExistsErrorNotDirectory = class extends DCommon.DuploJSError.parentClass("file-system-exists-not-directory", Error) {};
8
+ var ExistsErrorTooManyOpenFiles = class extends DCommon.DuploJSError.parentClass("file-system-exists-too-many-open-files", Error) {};
9
+ var ExistsError = class extends DCommon.DuploJSError.parentClass("file-system-exists-error", Error) {};
10
+ function handleNodeExistsError(error) {
11
+ let existsError = void 0;
12
+ if ("code" in error) {
13
+ if (error.code === "ENOENT") existsError = new ExistsErrorNotFound(error);
14
+ else if (error.code === "EACCES" || error.code === "EPERM") existsError = new ExistsErrorPermissionDenied(error);
15
+ else if (error.code === "ENOTDIR") existsError = new ExistsErrorNotDirectory(error);
16
+ else if (error.code === "EMFILE" || error.code === "ENFILE") existsError = new ExistsErrorTooManyOpenFiles(error);
17
+ }
18
+ if (existsError === void 0) existsError = new ExistsError(error);
19
+ return DEither.left("file-system-exists-error", existsError);
20
+ }
21
+ function handleDenoExistsError(error) {
22
+ let existsError = void 0;
23
+ if (error instanceof Deno.errors.NotFound) existsError = new ExistsErrorNotFound(error);
24
+ else if (error instanceof Deno.errors.PermissionDenied || error instanceof Deno.errors.NotCapable) existsError = new ExistsErrorPermissionDenied(error);
25
+ else if (error instanceof Deno.errors.NotADirectory) existsError = new ExistsErrorNotDirectory(error);
26
+ if (existsError === void 0) existsError = new ExistsError(error);
27
+ return DEither.left("file-system-exists-error", existsError);
28
+ }
29
+ const exists = implementFunction("exists", {
30
+ NODE: async (path) => nodeFileSystem.value.access(path).then(() => DEither.right("file-system-exists")).catch(handleNodeExistsError),
31
+ DENO: (path) => Deno.stat(path).then(() => DEither.right("file-system-exists")).catch(handleDenoExistsError),
32
+ BUN: (path) => Bun.file(path).exists().then((value) => value ? DEither.right("file-system-exists") : DEither.left("file-system-exists-error", new ExistsErrorNotFound(/* @__PURE__ */ new Error("Path does not exist")))).catch(handleNodeExistsError)
33
+ });
34
+ //#endregion
35
+ export { ExistsError, ExistsErrorNotDirectory, ExistsErrorNotFound, ExistsErrorPermissionDenied, ExistsErrorTooManyOpenFiles, exists };