@runlith/tagma 0.0.0-stage → 0.1.0

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 (342) hide show
  1. package/adapter/claudeHooks.d.ts +10 -0
  2. package/adapter/claudeHooks.js +4 -0
  3. package/adapter/declaration.d.ts +14 -0
  4. package/adapter/declaration.js +2 -0
  5. package/adapter/harness.d.ts +454 -0
  6. package/adapter/harness.js +2 -0
  7. package/adapter/hook.d.ts +43 -0
  8. package/adapter/hook.js +2 -0
  9. package/adapter/hostModules.d.ts +19 -0
  10. package/adapter/hostModules.js +2 -0
  11. package/adapter/loader.d.ts +10 -0
  12. package/adapter/loader.js +2 -0
  13. package/adapter/metadata.d.ts +179 -0
  14. package/adapter/metadata.js +4 -0
  15. package/adapter/payload.d.ts +19 -0
  16. package/adapter/payload.js +3 -0
  17. package/adapter/provider.d.ts +209 -0
  18. package/adapter/provider.js +2 -0
  19. package/adapter/settings.d.ts +182 -0
  20. package/adapter/settings.js +2 -0
  21. package/adapter/speech.d.ts +4 -0
  22. package/adapter/speech.js +2 -0
  23. package/host.d.ts +61223 -0
  24. package/package.json +129 -3
  25. package/plugin/Held-6krt6ncs.js +6 -0
  26. package/plugin/accountKey-tdjj67f5.js +2 -0
  27. package/plugin/adapter-qdnpxs6n.js +1 -0
  28. package/plugin/anthropic-a4pdzrv2.js +2 -0
  29. package/plugin/anthropic-messages-7gtja121.js +2 -0
  30. package/plugin/anthropic-z9xqmm3q.js +2 -0
  31. package/plugin/auth-0w6kk39v.js +2 -0
  32. package/plugin/authStatus-a1g3eb9p.js +2 -0
  33. package/plugin/bundling.d.ts +30 -0
  34. package/plugin/bundling.js +2 -0
  35. package/plugin/cacheLifetime-c5mpw676.js +2 -0
  36. package/plugin/callback-server-0wrzmjfx.js +16 -0
  37. package/plugin/capabilities-n3vfpy41.js +2 -0
  38. package/plugin/claudeHooks-edpg1e46.js +3 -0
  39. package/plugin/cli.js +21 -0
  40. package/plugin/cliStore-9rhjxtht.js +2 -0
  41. package/plugin/clientSession-tmmxm39z.js +2 -0
  42. package/plugin/codec-aa8mxqyr.js +1 -0
  43. package/plugin/connect-vrdsw05j.js +2 -0
  44. package/plugin/contract-qn0z7r9c.js +1 -0
  45. package/plugin/credential-5sgapkh0.js +2 -0
  46. package/plugin/deepseek-fvdrmjr9.js +2 -0
  47. package/plugin/deepseek-v388d1wv.js +2 -0
  48. package/plugin/definition-s3xx207f.js +2 -0
  49. package/plugin/description-8xhxryaq.js +2 -0
  50. package/plugin/deviceGrant-vgbscpr4.js +2 -0
  51. package/plugin/devin-hy98d305.js +2 -0
  52. package/plugin/duplex-kpmftvf7.js +2 -0
  53. package/plugin/endpoint-kvf97tz7.js +2 -0
  54. package/plugin/errors-5t42p4q1.js +2 -0
  55. package/plugin/events-e8vv9hda.js +2 -0
  56. package/plugin/events-s95ybm4g.js +2 -0
  57. package/plugin/executor-q8kp5q8h.js +2 -0
  58. package/plugin/failure-vr32debc.js +2 -0
  59. package/plugin/framing-nktw5sts.js +2 -0
  60. package/plugin/grant-67b10nhx.js +2 -0
  61. package/plugin/harness-nrh78w4d.js +2 -0
  62. package/plugin/headers-ss3dzznj.js +2 -0
  63. package/plugin/hook-hjrk83m8.js +2 -0
  64. package/plugin/icon-044pa3y8.js +6 -0
  65. package/plugin/icon-j22svmgp.js +4 -0
  66. package/plugin/icon-ny6qbjvc.js +4 -0
  67. package/plugin/icon-pz54e8n3.js +4 -0
  68. package/plugin/icon-qy92jx2b.js +4 -0
  69. package/plugin/ids-n269hc5k.js +2 -0
  70. package/plugin/images-q80x3bt1.js +2 -0
  71. package/plugin/index-cyd7v366.js +2 -0
  72. package/plugin/index-jpmjpmkn.js +2 -0
  73. package/plugin/lifecycle-qf4fh5m8.js +2 -0
  74. package/plugin/manual-2mdscj84.js +2 -0
  75. package/plugin/messages-1szh3p3k.js +2 -0
  76. package/plugin/metadata-zm1v3ptf.js +4 -0
  77. package/plugin/muse-r16jp51z.js +2 -0
  78. package/plugin/muse-tfe6sph7.js +2 -0
  79. package/plugin/museToolSchema-tbe0f3wa.js +2 -0
  80. package/plugin/notes-6amdhm6h.js +2 -0
  81. package/plugin/object-9pjtdam7.js +2 -0
  82. package/plugin/open-browser-vqb7ckt1.js +2 -0
  83. package/plugin/openai-0z6fy497.js +2 -0
  84. package/plugin/openai-37dne8v0.js +2 -0
  85. package/plugin/openai-compatible-chat-tq9w69h4.js +2 -0
  86. package/plugin/openai-images-x1sj79qh.js +2 -0
  87. package/plugin/openai-responses-dka6k753.js +2 -0
  88. package/plugin/opencodeGo-173fz5c5.js +3 -0
  89. package/plugin/opencodeGo-qgw3pfg6.js +2 -0
  90. package/plugin/options-pxwjpfdk.js +2 -0
  91. package/plugin/payload-2gr4q9g8.js +2 -0
  92. package/plugin/pkce-nrpept7w.js +2 -0
  93. package/plugin/plugin-1n46me5n.js +6 -0
  94. package/plugin/plugin-1vpp5mqk.js +4 -0
  95. package/plugin/plugin-1x94cj6e.js +3 -0
  96. package/plugin/plugin-1xze8f5y.js +3 -0
  97. package/plugin/plugin-285exjxd.js +3 -0
  98. package/plugin/plugin-3b8x73y6.js +3 -0
  99. package/plugin/plugin-3pfrkxg1.js +3 -0
  100. package/plugin/plugin-3whwpedj.js +3 -0
  101. package/plugin/plugin-521srf94.js +3 -0
  102. package/plugin/plugin-55fbx586.js +3 -0
  103. package/plugin/plugin-5zq084fb.js +3 -0
  104. package/plugin/plugin-60bdzk1r.js +4 -0
  105. package/plugin/plugin-6a56xsx3.js +3 -0
  106. package/plugin/plugin-6xpcmvm3.js +36 -0
  107. package/plugin/plugin-72xxqm1t.js +3 -0
  108. package/plugin/plugin-7y7ndrk9.js +3 -0
  109. package/plugin/plugin-80gqwmjy.js +3 -0
  110. package/plugin/plugin-8230g28p.js +3 -0
  111. package/plugin/plugin-8jf7f360.js +3 -0
  112. package/plugin/plugin-92redty0.js +3 -0
  113. package/plugin/plugin-9gha9fx3.js +3 -0
  114. package/plugin/plugin-a4ng6krf.js +3 -0
  115. package/plugin/plugin-ak62rhwz.js +3 -0
  116. package/plugin/plugin-ay29ch70.js +3 -0
  117. package/plugin/plugin-ba1sv0th.js +3 -0
  118. package/plugin/plugin-ca4vf4j5.js +3 -0
  119. package/plugin/plugin-cydz2zhy.js +3 -0
  120. package/plugin/plugin-d6hbav22.js +3 -0
  121. package/plugin/plugin-e2y95zm5.js +3 -0
  122. package/plugin/plugin-ff38dxy1.js +3 -0
  123. package/plugin/plugin-ff9hx5a4.js +3 -0
  124. package/plugin/plugin-fhc5q7r3.js +3 -0
  125. package/plugin/plugin-frrvs5yc.js +3 -0
  126. package/plugin/plugin-g65b14k1.js +3 -0
  127. package/plugin/plugin-gh857xdd.js +3 -0
  128. package/plugin/plugin-gkgs7vfv.js +3 -0
  129. package/plugin/plugin-h66k1zhn.js +14 -0
  130. package/plugin/plugin-je5cfnqn.js +3 -0
  131. package/plugin/plugin-jjm52353.js +3 -0
  132. package/plugin/plugin-jxvmq18y.js +3 -0
  133. package/plugin/plugin-kc4z9msd.js +3 -0
  134. package/plugin/plugin-kjtzm2q6.js +3 -0
  135. package/plugin/plugin-krbbb4ts.js +3 -0
  136. package/plugin/plugin-me00x60n.js +3 -0
  137. package/plugin/plugin-mqr325kz.js +3 -0
  138. package/plugin/plugin-njh1f7b2.js +5 -0
  139. package/plugin/plugin-nkb5bb2q.js +3 -0
  140. package/plugin/plugin-nqmb78ez.js +4 -0
  141. package/plugin/plugin-nzacjxf9.js +3 -0
  142. package/plugin/plugin-p59gy5xd.js +3 -0
  143. package/plugin/plugin-pfj9nc2e.js +3 -0
  144. package/plugin/plugin-pkxw1pfs.js +3 -0
  145. package/plugin/plugin-q1n5kwx0.js +3 -0
  146. package/plugin/plugin-q1sqj2tc.js +3 -0
  147. package/plugin/plugin-q7rk75bs.js +3 -0
  148. package/plugin/plugin-qpda63gv.js +3 -0
  149. package/plugin/plugin-rrgyjesv.js +3 -0
  150. package/plugin/plugin-sfdxgkds.js +3 -0
  151. package/plugin/plugin-v7k9fx92.js +3 -0
  152. package/plugin/plugin-vfjhxng8.js +3 -0
  153. package/plugin/plugin-vv72e4ah.js +3 -0
  154. package/plugin/plugin-w8f977my.js +3 -0
  155. package/plugin/plugin-xbnw80pk.js +3 -0
  156. package/plugin/plugin-yxgg03s0.js +5 -0
  157. package/plugin/plugin-z6hkd9rw.js +3 -0
  158. package/plugin/plugin-zew2m18x.js +3 -0
  159. package/plugin/plugin-zphe2a5v.js +9 -0
  160. package/plugin/plugin-zvyk8bnr.js +3 -0
  161. package/plugin/plugin-zw3ywa4b.js +3 -0
  162. package/plugin/plugin-zxe49p72.js +3 -0
  163. package/plugin/plugin-zz7yc97m.js +3 -0
  164. package/plugin/plugin.d.ts +175 -0
  165. package/plugin/plugin.js +2 -0
  166. package/plugin/points.generated.d.ts +341 -0
  167. package/plugin/points.generated.js +2 -0
  168. package/plugin/process.d.ts +4 -0
  169. package/plugin/process.js +85 -0
  170. package/plugin/protocol-hwnfh4h1.js +2 -0
  171. package/plugin/protocol.d.ts +115 -0
  172. package/plugin/protocol.js +2 -0
  173. package/plugin/provider-0b7xxyhn.js +2 -0
  174. package/plugin/quota-vrrmfag6.js +2 -0
  175. package/plugin/quotaRead-vj6e90xc.js +2 -0
  176. package/plugin/reasoning-5nanktp2.js +2 -0
  177. package/plugin/record-1m3vvy60.js +2 -0
  178. package/plugin/requests-2zyr1g8e.js +1 -0
  179. package/plugin/responseFold-w4526gvb.js +2 -0
  180. package/plugin/settings-vdypzert.js +2 -0
  181. package/plugin/shared-a2yyy8ry.js +2 -0
  182. package/plugin/speech-067caz1a.js +2 -0
  183. package/plugin/stepfun-3en5g41d.js +2 -0
  184. package/plugin/stepfun-bwsz4nrd.js +2 -0
  185. package/plugin/stream-bt8etfpc.js +2 -0
  186. package/plugin/svelteProgram-73v9yajk.js +2 -0
  187. package/plugin/synthesisDuplex-m2j6pmyv.js +2 -0
  188. package/plugin/template.d.ts +14 -0
  189. package/plugin/template.js +2 -0
  190. package/plugin/testing.d.ts +85 -0
  191. package/plugin/testing.js +4 -0
  192. package/plugin/tool-content-b9jtprr7.js +2 -0
  193. package/plugin/tool-stream-gdajdxn0.js +2 -0
  194. package/plugin/transport-7hfp9sn4.js +2 -0
  195. package/plugin/ui.generated.d.ts +1044 -0
  196. package/plugin/value.d.ts +8 -0
  197. package/plugin/value.js +2 -0
  198. package/plugin/vendor-pn6b5a8f.js +2 -0
  199. package/plugin/vendorCall-6n5chrn0.js +2 -0
  200. package/plugin/vendorCall-hv01nwsp.js +2 -0
  201. package/plugin/vendorPayload-awxqr7t8.js +2 -0
  202. package/plugin/vendorWeb-vnf344r1.js +2 -0
  203. package/plugin/verbatim-mqt9x4aa.js +2 -0
  204. package/plugin/xai-e8sbtk6a.js +2 -0
  205. package/plugin/xai-z1ysta23.js +2 -0
  206. package/rules/effect.d.ts +55 -0
  207. package/rules/effect.js +11 -0
  208. package/rules/rules.d.ts +342 -0
  209. package/rules/rules.js +50 -0
  210. package/types/node/assert/strict.d.ts +12 -0
  211. package/types/node/assert.d.ts +76 -0
  212. package/types/node/async_hooks.d.ts +113 -0
  213. package/types/node/buffer.buffer.d.ts +29 -0
  214. package/types/node/buffer.d.ts +162 -0
  215. package/types/node/child_process.d.ts +337 -0
  216. package/types/node/cluster.d.ts +118 -0
  217. package/types/node/compatibility/iterators.d.ts +11 -0
  218. package/types/node/console.d.ts +48 -0
  219. package/types/node/constants.d.ts +8 -0
  220. package/types/node/crypto.d.ts +847 -0
  221. package/types/node/dgram.d.ts +88 -0
  222. package/types/node/diagnostics_channel.d.ts +61 -0
  223. package/types/node/dns/promises.d.ts +94 -0
  224. package/types/node/dns.d.ts +276 -0
  225. package/types/node/domain.d.ts +17 -0
  226. package/types/node/events.d.ts +138 -0
  227. package/types/node/fs/promises.d.ts +253 -0
  228. package/types/node/fs.d.ts +1038 -0
  229. package/types/node/globals.d.ts +73 -0
  230. package/types/node/globals.typedarray.d.ts +22 -0
  231. package/types/node/http.d.ts +530 -0
  232. package/types/node/http2.d.ts +794 -0
  233. package/types/node/https.d.ts +66 -0
  234. package/types/node/index.d.ts +84 -0
  235. package/types/node/inspector/promises.d.ts +13 -0
  236. package/types/node/inspector.d.ts +61 -0
  237. package/types/node/inspector.generated.d.ts +1624 -0
  238. package/types/node/module.d.ts +187 -0
  239. package/types/node/net.d.ts +266 -0
  240. package/types/node/os.d.ts +236 -0
  241. package/types/node/path/posix.d.ts +8 -0
  242. package/types/node/path/win32.d.ts +8 -0
  243. package/types/node/path.d.ts +40 -0
  244. package/types/node/perf_hooks.d.ts +236 -0
  245. package/types/node/process.d.ts +436 -0
  246. package/types/node/punycode.d.ts +15 -0
  247. package/types/node/querystring.d.ts +22 -0
  248. package/types/node/quic.d.ts +203 -0
  249. package/types/node/readline/promises.d.ts +28 -0
  250. package/types/node/readline.d.ts +94 -0
  251. package/types/node/repl.d.ts +104 -0
  252. package/types/node/sea.d.ts +11 -0
  253. package/types/node/sqlite.d.ts +183 -0
  254. package/types/node/stream/consumers.d.ts +13 -0
  255. package/types/node/stream/iter.d.ts +240 -0
  256. package/types/node/stream/promises.d.ts +37 -0
  257. package/types/node/stream/web.d.ts +297 -0
  258. package/types/node/stream.d.ts +378 -0
  259. package/types/node/string_decoder.d.ts +10 -0
  260. package/types/node/test/reporters.d.ts +66 -0
  261. package/types/node/test.d.ts +462 -0
  262. package/types/node/timers/promises.d.ts +16 -0
  263. package/types/node/timers.d.ts +43 -0
  264. package/types/node/tls.d.ts +279 -0
  265. package/types/node/trace_events.d.ts +16 -0
  266. package/types/node/ts5.6/buffer.buffer.d.ts +26 -0
  267. package/types/node/ts5.6/compatibility/float16array.d.ts +43 -0
  268. package/types/node/ts5.6/globals.typedarray.d.ts +22 -0
  269. package/types/node/ts5.6/index.d.ts +84 -0
  270. package/types/node/ts5.7/compatibility/float16array.d.ts +50 -0
  271. package/types/node/ts5.7/index.d.ts +84 -0
  272. package/types/node/tty.d.ts +61 -0
  273. package/types/node/url.d.ts +165 -0
  274. package/types/node/util/types.d.ts +49 -0
  275. package/types/node/util.d.ts +320 -0
  276. package/types/node/v8.d.ts +178 -0
  277. package/types/node/vm.d.ts +130 -0
  278. package/types/node/wasi.d.ts +26 -0
  279. package/types/node/web-globals/abortcontroller.d.ts +47 -0
  280. package/types/node/web-globals/blob.d.ts +34 -0
  281. package/types/node/web-globals/console.d.ts +7 -0
  282. package/types/node/web-globals/crypto.d.ts +46 -0
  283. package/types/node/web-globals/domexception.d.ts +74 -0
  284. package/types/node/web-globals/encoding.d.ts +16 -0
  285. package/types/node/web-globals/events.d.ts +111 -0
  286. package/types/node/web-globals/fetch.d.ts +121 -0
  287. package/types/node/web-globals/importmeta.d.ts +11 -0
  288. package/types/node/web-globals/messaging.d.ts +32 -0
  289. package/types/node/web-globals/navigator.d.ts +28 -0
  290. package/types/node/web-globals/performance.d.ts +71 -0
  291. package/types/node/web-globals/storage.d.ts +26 -0
  292. package/types/node/web-globals/streams.d.ts +162 -0
  293. package/types/node/web-globals/timers.d.ts +22 -0
  294. package/types/node/web-globals/url.d.ts +27 -0
  295. package/types/node/worker_threads.d.ts +199 -0
  296. package/types/node/zlib/iter.d.ts +49 -0
  297. package/types/node/zlib.d.ts +360 -0
  298. package/types/undici/agent.d.ts +24 -0
  299. package/types/undici/api.d.ts +19 -0
  300. package/types/undici/balanced-pool.d.ts +16 -0
  301. package/types/undici/cache-interceptor.d.ts +98 -0
  302. package/types/undici/cache.d.ts +30 -0
  303. package/types/undici/client-stats.d.ts +9 -0
  304. package/types/undici/client.d.ts +61 -0
  305. package/types/undici/connector.d.ts +37 -0
  306. package/types/undici/content-type.d.ts +9 -0
  307. package/types/undici/cookies.d.ts +22 -0
  308. package/types/undici/diagnostics-channel.d.ts +72 -0
  309. package/types/undici/dispatcher.d.ts +207 -0
  310. package/types/undici/env-http-proxy-agent.d.ts +15 -0
  311. package/types/undici/errors.d.ts +117 -0
  312. package/types/undici/eventsource.d.ts +39 -0
  313. package/types/undici/fetch.d.ts +122 -0
  314. package/types/undici/formdata.d.ts +24 -0
  315. package/types/undici/global-dispatcher.d.ts +4 -0
  316. package/types/undici/global-origin.d.ts +3 -0
  317. package/types/undici/h2c-client.d.ts +35 -0
  318. package/types/undici/handlers.d.ts +7 -0
  319. package/types/undici/header.d.ts +10 -0
  320. package/types/undici/index.d.ts +85 -0
  321. package/types/undici/interceptors.d.ts +70 -0
  322. package/types/undici/mock-agent.d.ts +43 -0
  323. package/types/undici/mock-call-history.d.ts +57 -0
  324. package/types/undici/mock-client.d.ts +17 -0
  325. package/types/undici/mock-errors.d.ts +9 -0
  326. package/types/undici/mock-interceptor.d.ts +60 -0
  327. package/types/undici/mock-pool.d.ts +17 -0
  328. package/types/undici/patch.d.ts +21 -0
  329. package/types/undici/pool-stats.d.ts +11 -0
  330. package/types/undici/pool.d.ts +25 -0
  331. package/types/undici/proxy-agent.d.ts +22 -0
  332. package/types/undici/readable.d.ts +24 -0
  333. package/types/undici/retry-agent.d.ts +6 -0
  334. package/types/undici/retry-handler.d.ts +41 -0
  335. package/types/undici/round-robin-pool.d.ts +25 -0
  336. package/types/undici/snapshot-agent.d.ts +98 -0
  337. package/types/undici/socks5-proxy-agent.d.ts +17 -0
  338. package/types/undici/util.d.ts +4 -0
  339. package/types/undici/utility.d.ts +2 -0
  340. package/types/undici/webidl.d.ts +121 -0
  341. package/types/undici/websocket.d.ts +130 -0
  342. package/README.md +0 -3
@@ -0,0 +1,1038 @@
1
+ declare module "node:fs" {
2
+ import { NonSharedBuffer } from "node:buffer";
3
+ import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
4
+ import { FileHandle } from "node:fs/promises";
5
+ import * as stream from "node:stream";
6
+ import { URL } from "node:url";
7
+ type PathLike = string | Buffer | URL;
8
+ type PathOrFileDescriptor = PathLike | number;
9
+ type TimeLike = string | number | Date;
10
+ type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
11
+ type BufferEncodingOption = "buffer" | {
12
+ encoding: "buffer";
13
+ };
14
+ interface ObjectEncodingOptions {
15
+ encoding?: BufferEncoding | null | undefined;
16
+ }
17
+ type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
18
+ type OpenMode = number | string;
19
+ type Mode = number | string;
20
+ interface StatsBase<T> {
21
+ isFile(): boolean;
22
+ isDirectory(): boolean;
23
+ isBlockDevice(): boolean;
24
+ isCharacterDevice(): boolean;
25
+ isSymbolicLink(): boolean;
26
+ isFIFO(): boolean;
27
+ isSocket(): boolean;
28
+ dev: T;
29
+ ino: T;
30
+ mode: T;
31
+ nlink: T;
32
+ uid: T;
33
+ gid: T;
34
+ rdev: T;
35
+ size: T;
36
+ blksize: T;
37
+ blocks: T;
38
+ atimeMs: T;
39
+ mtimeMs: T;
40
+ ctimeMs: T;
41
+ birthtimeMs: T;
42
+ atime: Date;
43
+ mtime: Date;
44
+ ctime: Date;
45
+ birthtime: Date;
46
+ }
47
+ interface Stats extends StatsBase<number> {
48
+ }
49
+ class Stats {
50
+ private constructor();
51
+ }
52
+ interface StatsFsBase<T> {
53
+ type: T;
54
+ bsize: T;
55
+ blocks: T;
56
+ bfree: T;
57
+ bavail: T;
58
+ files: T;
59
+ ffree: T;
60
+ }
61
+ interface StatsFs extends StatsFsBase<number> {
62
+ }
63
+ class StatsFs {
64
+ }
65
+ interface BigIntStatsFs extends StatsFsBase<bigint> {
66
+ }
67
+ interface StatFsOptions {
68
+ bigint?: boolean | undefined;
69
+ }
70
+ class Dirent<Name extends string | Buffer = string> {
71
+ isFile(): boolean;
72
+ isDirectory(): boolean;
73
+ isBlockDevice(): boolean;
74
+ isCharacterDevice(): boolean;
75
+ isSymbolicLink(): boolean;
76
+ isFIFO(): boolean;
77
+ isSocket(): boolean;
78
+ name: Name;
79
+ parentPath: string;
80
+ }
81
+ class Dir implements AsyncIterable<Dirent> {
82
+ readonly path: string;
83
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<Dirent>;
84
+ close(): Promise<void>;
85
+ close(cb: NoParamCallback): void;
86
+ closeSync(): void;
87
+ read(): Promise<Dirent | null>;
88
+ read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
89
+ readSync(): Dirent | null;
90
+ [Symbol.asyncDispose](): Promise<void>;
91
+ [Symbol.dispose](): void;
92
+ }
93
+ interface StatWatcher extends EventEmitter {
94
+ ref(): this;
95
+ unref(): this;
96
+ }
97
+ interface FSWatcherEventMap {
98
+ "change": [
99
+ eventType: string,
100
+ filename: string | NonSharedBuffer
101
+ ];
102
+ "close": [
103
+ ];
104
+ "error": [
105
+ error: Error
106
+ ];
107
+ }
108
+ interface FSWatcher extends InternalEventEmitter<FSWatcherEventMap> {
109
+ close(): void;
110
+ ref(): this;
111
+ unref(): this;
112
+ }
113
+ interface ReadStreamEventMap extends stream.ReadableEventMap {
114
+ "close": [
115
+ ];
116
+ "data": [
117
+ chunk: string | NonSharedBuffer
118
+ ];
119
+ "open": [
120
+ fd: number
121
+ ];
122
+ "ready": [
123
+ ];
124
+ }
125
+ class ReadStream extends stream.Readable {
126
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
127
+ bytesRead: number;
128
+ path: string | Buffer;
129
+ pending: boolean;
130
+ addListener<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
131
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
132
+ emit<E extends keyof ReadStreamEventMap>(eventName: E, ...args: ReadStreamEventMap[E]): boolean;
133
+ emit(eventName: string | symbol, ...args: any[]): boolean;
134
+ listenerCount<E extends keyof ReadStreamEventMap>(eventName: E, listener?: (...args: ReadStreamEventMap[E]) => void): number;
135
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
136
+ listeners<E extends keyof ReadStreamEventMap>(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[];
137
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
138
+ off<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
139
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
140
+ on<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
141
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
142
+ once<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
143
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
144
+ prependListener<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
145
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
146
+ prependOnceListener<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
147
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
148
+ rawListeners<E extends keyof ReadStreamEventMap>(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[];
149
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
150
+ removeAllListeners<E extends keyof ReadStreamEventMap>(eventName?: E): this;
151
+ removeAllListeners(eventName?: string | symbol): this;
152
+ removeListener<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
153
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
154
+ }
155
+ interface Utf8StreamOptions {
156
+ append?: boolean | undefined;
157
+ contentMode?: "utf8" | "buffer" | undefined;
158
+ dest?: string | undefined;
159
+ fd?: number | undefined;
160
+ fs?: object | undefined;
161
+ fsync?: boolean | undefined;
162
+ maxLength?: number | undefined;
163
+ maxWrite?: number | undefined;
164
+ minLength?: number | undefined;
165
+ mkdir?: boolean | undefined;
166
+ mode?: number | string | undefined;
167
+ periodicFlush?: number | undefined;
168
+ retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined;
169
+ sync?: boolean | undefined;
170
+ }
171
+ interface Utf8StreamEventMap {
172
+ "close": [
173
+ ];
174
+ "drain": [
175
+ ];
176
+ "drop": [
177
+ data: string | Buffer
178
+ ];
179
+ "error": [
180
+ error: Error
181
+ ];
182
+ "finish": [
183
+ ];
184
+ "ready": [
185
+ ];
186
+ "write": [
187
+ n: number
188
+ ];
189
+ }
190
+ class Utf8Stream implements EventEmitter {
191
+ constructor(options: Utf8StreamOptions);
192
+ readonly append: boolean;
193
+ readonly contentMode: "utf8" | "buffer";
194
+ destroy(): void;
195
+ end(): void;
196
+ readonly fd: number;
197
+ readonly file: string;
198
+ flush(callback: (err: Error | null) => void): void;
199
+ flushSync(): void;
200
+ readonly fsync: boolean;
201
+ readonly maxLength: number;
202
+ readonly minLength: number;
203
+ readonly mkdir: boolean;
204
+ readonly mode: number | string;
205
+ readonly periodicFlush: number;
206
+ reopen(file: PathLike): void;
207
+ readonly sync: boolean;
208
+ write(data: string | Buffer): boolean;
209
+ readonly writing: boolean;
210
+ [Symbol.dispose](): void;
211
+ }
212
+ interface Utf8Stream extends InternalEventEmitter<Utf8StreamEventMap> {
213
+ }
214
+ interface WriteStreamEventMap extends stream.WritableEventMap {
215
+ "close": [
216
+ ];
217
+ "open": [
218
+ fd: number
219
+ ];
220
+ "ready": [
221
+ ];
222
+ }
223
+ class WriteStream extends stream.Writable {
224
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
225
+ bytesWritten: number;
226
+ path: string | Buffer;
227
+ pending: boolean;
228
+ addListener<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
229
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
230
+ emit<E extends keyof WriteStreamEventMap>(eventName: E, ...args: WriteStreamEventMap[E]): boolean;
231
+ emit(eventName: string | symbol, ...args: any[]): boolean;
232
+ listenerCount<E extends keyof WriteStreamEventMap>(eventName: E, listener?: (...args: WriteStreamEventMap[E]) => void): number;
233
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
234
+ listeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
235
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
236
+ off<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
237
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
238
+ on<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
239
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
240
+ once<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
241
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
242
+ prependListener<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
243
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
244
+ prependOnceListener<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
245
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
246
+ rawListeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
247
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
248
+ removeAllListeners<E extends keyof WriteStreamEventMap>(eventName?: E): this;
249
+ removeAllListeners(eventName?: string | symbol): this;
250
+ removeListener<E extends keyof WriteStreamEventMap>(eventName: E, listener: (...args: WriteStreamEventMap[E]) => void): this;
251
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
252
+ }
253
+ function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
254
+ namespace rename {
255
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
256
+ }
257
+ function renameSync(oldPath: PathLike, newPath: PathLike): void;
258
+ function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void;
259
+ function truncate(path: PathLike, callback: NoParamCallback): void;
260
+ namespace truncate {
261
+ function __promisify__(path: PathLike, len?: number): Promise<void>;
262
+ }
263
+ function truncateSync(path: PathLike, len?: number): void;
264
+ function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void;
265
+ function ftruncate(fd: number, callback: NoParamCallback): void;
266
+ namespace ftruncate {
267
+ function __promisify__(fd: number, len?: number): Promise<void>;
268
+ }
269
+ function ftruncateSync(fd: number, len?: number): void;
270
+ function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
271
+ namespace chown {
272
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
273
+ }
274
+ function chownSync(path: PathLike, uid: number, gid: number): void;
275
+ function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
276
+ namespace fchown {
277
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
278
+ }
279
+ function fchownSync(fd: number, uid: number, gid: number): void;
280
+ function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
281
+ namespace lchown {
282
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
283
+ }
284
+ function lchownSync(path: PathLike, uid: number, gid: number): void;
285
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
286
+ namespace lutimes {
287
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
288
+ }
289
+ function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
290
+ function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
291
+ namespace chmod {
292
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
293
+ }
294
+ function chmodSync(path: PathLike, mode: Mode): void;
295
+ function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
296
+ namespace fchmod {
297
+ function __promisify__(fd: number, mode: Mode): Promise<void>;
298
+ }
299
+ function fchmodSync(fd: number, mode: Mode): void;
300
+ function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
301
+ namespace lchmod {
302
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
303
+ }
304
+ function lchmodSync(path: PathLike, mode: Mode): void;
305
+ function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
306
+ function stat(path: PathLike, options: (StatOptions & {
307
+ bigint?: false | undefined;
308
+ throwIfNoEntry?: true | undefined;
309
+ }) | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
310
+ function stat(path: PathLike, options: StatOptions & {
311
+ bigint: true;
312
+ throwIfNoEntry?: true | undefined;
313
+ }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
314
+ function stat(path: PathLike, options: StatOptions & {
315
+ bigint?: false | undefined;
316
+ throwIfNoEntry: false;
317
+ }, callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void): void;
318
+ function stat(path: PathLike, options: StatOptions & {
319
+ bigint: true;
320
+ throwIfNoEntry: false;
321
+ }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void): void;
322
+ function stat(path: PathLike, options: StatOptions & {
323
+ throwIfNoEntry?: true | undefined;
324
+ }, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
325
+ function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void): void;
326
+ namespace stat {
327
+ function __promisify__(path: PathLike): Promise<Stats>;
328
+ function __promisify__(path: PathLike, options?: StatOptions & {
329
+ bigint?: false | undefined;
330
+ throwIfNoEntry?: true | undefined;
331
+ }): Promise<Stats>;
332
+ function __promisify__(path: PathLike, options: StatOptions & {
333
+ bigint: true;
334
+ throwIfNoEntry?: true | undefined;
335
+ }): Promise<BigIntStats>;
336
+ function __promisify__(path: PathLike, options: StatOptions & {
337
+ bigint?: false | undefined;
338
+ throwIfNoEntry: false;
339
+ }): Promise<Stats | undefined>;
340
+ function __promisify__(path: PathLike, options: StatOptions & {
341
+ bigint: true;
342
+ throwIfNoEntry: false;
343
+ }): Promise<BigIntStats | undefined>;
344
+ function __promisify__(path: PathLike, options: StatOptions & {
345
+ throwIfNoEntry?: true | undefined;
346
+ }): Promise<Stats | BigIntStats>;
347
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats | undefined>;
348
+ }
349
+ interface StatSyncFn extends Function {
350
+ (path: PathLike, options?: undefined): Stats;
351
+ (path: PathLike, options?: StatSyncOptions & {
352
+ bigint?: false | undefined;
353
+ throwIfNoEntry: false;
354
+ }): Stats | undefined;
355
+ (path: PathLike, options: StatSyncOptions & {
356
+ bigint: true;
357
+ throwIfNoEntry: false;
358
+ }): BigIntStats | undefined;
359
+ (path: PathLike, options?: StatSyncOptions & {
360
+ bigint?: false | undefined;
361
+ }): Stats;
362
+ (path: PathLike, options: StatSyncOptions & {
363
+ bigint: true;
364
+ }): BigIntStats;
365
+ (path: PathLike, options: StatSyncOptions & {
366
+ bigint: boolean;
367
+ throwIfNoEntry?: false | undefined;
368
+ }): Stats | BigIntStats;
369
+ (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
370
+ }
371
+ function statSync(path: PathLike): Stats;
372
+ function statSync(path: PathLike, options?: StatOptions & {
373
+ bigint?: false | undefined;
374
+ throwIfNoEntry?: true | undefined;
375
+ }): Stats;
376
+ function statSync(path: PathLike, options: StatOptions & {
377
+ bigint: true;
378
+ throwIfNoEntry?: true | undefined;
379
+ }): BigIntStats;
380
+ function statSync(path: PathLike, options: StatOptions & {
381
+ bigint?: false | undefined;
382
+ throwIfNoEntry: false;
383
+ }): Stats | undefined;
384
+ function statSync(path: PathLike, options: StatOptions & {
385
+ bigint: true;
386
+ throwIfNoEntry: false;
387
+ }): BigIntStats | undefined;
388
+ function statSync(path: PathLike, options: StatOptions & {
389
+ throwIfNoEntry?: true | undefined;
390
+ }): Stats | BigIntStats;
391
+ function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined;
392
+ function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
393
+ function fstat(fd: number, options: (StatOptions & {
394
+ bigint?: false | undefined;
395
+ }) | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
396
+ function fstat(fd: number, options: StatOptions & {
397
+ bigint: true;
398
+ }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
399
+ function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
400
+ namespace fstat {
401
+ function __promisify__(fd: number, options?: StatOptions & {
402
+ bigint?: false | undefined;
403
+ }): Promise<Stats>;
404
+ function __promisify__(fd: number, options: StatOptions & {
405
+ bigint: true;
406
+ }): Promise<BigIntStats>;
407
+ function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
408
+ }
409
+ function fstatSync(fd: number, options?: StatOptions & {
410
+ bigint?: false | undefined;
411
+ }): Stats;
412
+ function fstatSync(fd: number, options: StatOptions & {
413
+ bigint: true;
414
+ }): BigIntStats;
415
+ function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
416
+ function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
417
+ function lstat(path: PathLike, options: (StatOptions & {
418
+ bigint?: false | undefined;
419
+ }) | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
420
+ function lstat(path: PathLike, options: StatOptions & {
421
+ bigint: true;
422
+ }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
423
+ function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
424
+ namespace lstat {
425
+ function __promisify__(path: PathLike, options?: StatOptions & {
426
+ bigint?: false | undefined;
427
+ }): Promise<Stats>;
428
+ function __promisify__(path: PathLike, options: StatOptions & {
429
+ bigint: true;
430
+ }): Promise<BigIntStats>;
431
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
432
+ }
433
+ function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
434
+ function statfs(path: PathLike, options: (StatFsOptions & {
435
+ bigint?: false | undefined;
436
+ }) | undefined, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
437
+ function statfs(path: PathLike, options: StatFsOptions & {
438
+ bigint: true;
439
+ }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void): void;
440
+ function statfs(path: PathLike, options: StatFsOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void): void;
441
+ namespace statfs {
442
+ function __promisify__(path: PathLike, options?: StatFsOptions & {
443
+ bigint?: false | undefined;
444
+ }): Promise<StatsFs>;
445
+ function __promisify__(path: PathLike, options: StatFsOptions & {
446
+ bigint: true;
447
+ }): Promise<BigIntStatsFs>;
448
+ function __promisify__(path: PathLike, options?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
449
+ }
450
+ function statfsSync(path: PathLike, options?: StatFsOptions & {
451
+ bigint?: false | undefined;
452
+ }): StatsFs;
453
+ function statfsSync(path: PathLike, options: StatFsOptions & {
454
+ bigint: true;
455
+ }): BigIntStatsFs;
456
+ function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
457
+ function lstatSync(path: PathLike): Stats;
458
+ function lstatSync(path: PathLike, options?: StatOptions & {
459
+ bigint?: false | undefined;
460
+ throwIfNoEntry?: true | undefined;
461
+ }): Stats;
462
+ function lstatSync(path: PathLike, options: StatOptions & {
463
+ bigint: true;
464
+ throwIfNoEntry?: true | undefined;
465
+ }): BigIntStats;
466
+ function lstatSync(path: PathLike, options: StatOptions & {
467
+ bigint?: false | undefined;
468
+ throwIfNoEntry: false;
469
+ }): Stats | undefined;
470
+ function lstatSync(path: PathLike, options: StatOptions & {
471
+ bigint: true;
472
+ throwIfNoEntry: false;
473
+ }): BigIntStats | undefined;
474
+ function lstatSync(path: PathLike, options: StatOptions & {
475
+ throwIfNoEntry?: true | undefined;
476
+ }): Stats | BigIntStats;
477
+ function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined;
478
+ function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
479
+ namespace link {
480
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
481
+ }
482
+ function linkSync(existingPath: PathLike, newPath: PathLike): void;
483
+ function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
484
+ function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
485
+ namespace symlink {
486
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
487
+ type Type = "dir" | "file" | "junction";
488
+ }
489
+ function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
490
+ function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
491
+ function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void): void;
492
+ function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void): void;
493
+ function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
494
+ namespace readlink {
495
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
496
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
497
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | NonSharedBuffer>;
498
+ }
499
+ function readlinkSync(path: PathLike, options?: EncodingOption): string;
500
+ function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
501
+ function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
502
+ function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
503
+ function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void): void;
504
+ function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void): void;
505
+ function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
506
+ namespace realpath {
507
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
508
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
509
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | NonSharedBuffer>;
510
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
511
+ function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void): void;
512
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void): void;
513
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
514
+ }
515
+ function realpathSync(path: PathLike, options?: EncodingOption): string;
516
+ function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
517
+ function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
518
+ namespace realpathSync {
519
+ function native(path: PathLike, options?: EncodingOption): string;
520
+ function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
521
+ function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
522
+ }
523
+ function unlink(path: PathLike, callback: NoParamCallback): void;
524
+ namespace unlink {
525
+ function __promisify__(path: PathLike): Promise<void>;
526
+ }
527
+ function unlinkSync(path: PathLike): void;
528
+ interface RmDirOptions {
529
+ }
530
+ function rmdir(path: PathLike, callback: NoParamCallback): void;
531
+ namespace rmdir {
532
+ function __promisify__(path: PathLike): Promise<void>;
533
+ }
534
+ function rmdirSync(path: PathLike): void;
535
+ interface RmOptions {
536
+ force?: boolean | undefined;
537
+ maxRetries?: number | undefined;
538
+ recursive?: boolean | undefined;
539
+ retryDelay?: number | undefined;
540
+ }
541
+ function rm(path: PathLike, callback: NoParamCallback): void;
542
+ function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
543
+ namespace rm {
544
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
545
+ }
546
+ function rmSync(path: PathLike, options?: RmOptions): void;
547
+ interface MakeDirectoryOptions {
548
+ recursive?: boolean | undefined;
549
+ mode?: Mode | undefined;
550
+ }
551
+ function mkdir(path: PathLike, options: MakeDirectoryOptions & {
552
+ recursive: true;
553
+ }, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
554
+ function mkdir(path: PathLike, options: Mode | (MakeDirectoryOptions & {
555
+ recursive?: false | undefined;
556
+ }) | null | undefined, callback: NoParamCallback): void;
557
+ function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
558
+ function mkdir(path: PathLike, callback: NoParamCallback): void;
559
+ namespace mkdir {
560
+ function __promisify__(path: PathLike, options: MakeDirectoryOptions & {
561
+ recursive: true;
562
+ }): Promise<string | undefined>;
563
+ function __promisify__(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
564
+ recursive?: false | undefined;
565
+ }) | null): Promise<void>;
566
+ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
567
+ }
568
+ function mkdirSync(path: PathLike, options: MakeDirectoryOptions & {
569
+ recursive: true;
570
+ }): string | undefined;
571
+ function mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
572
+ recursive?: false | undefined;
573
+ }) | null): void;
574
+ function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
575
+ function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
576
+ function mkdtemp(prefix: string, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void): void;
577
+ function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void): void;
578
+ function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
579
+ namespace mkdtemp {
580
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string>;
581
+ function __promisify__(prefix: string, options: BufferEncodingOption): Promise<NonSharedBuffer>;
582
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string | NonSharedBuffer>;
583
+ }
584
+ function mkdtempSync(prefix: string, options?: EncodingOption): string;
585
+ function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer;
586
+ function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer;
587
+ interface DisposableTempDir extends Disposable {
588
+ path: string;
589
+ remove(): void;
590
+ [Symbol.dispose](): void;
591
+ }
592
+ function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir;
593
+ function readdir(path: PathLike, options: {
594
+ encoding: BufferEncoding | null;
595
+ withFileTypes?: false | undefined;
596
+ recursive?: boolean | undefined;
597
+ } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
598
+ function readdir(path: PathLike, options: {
599
+ encoding: "buffer";
600
+ withFileTypes?: false | undefined;
601
+ recursive?: boolean | undefined;
602
+ } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void): void;
603
+ function readdir(path: PathLike, options: (ObjectEncodingOptions & {
604
+ withFileTypes?: false | undefined;
605
+ recursive?: boolean | undefined;
606
+ }) | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void): void;
607
+ function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
608
+ function readdir(path: PathLike, options: ObjectEncodingOptions & {
609
+ withFileTypes: true;
610
+ recursive?: boolean | undefined;
611
+ }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
612
+ function readdir(path: PathLike, options: {
613
+ encoding: "buffer";
614
+ withFileTypes: true;
615
+ recursive?: boolean | undefined;
616
+ }, callback: (err: NodeJS.ErrnoException | null, files: Dirent<NonSharedBuffer>[]) => void): void;
617
+ namespace readdir {
618
+ function __promisify__(path: PathLike, options?: {
619
+ encoding: BufferEncoding | null;
620
+ withFileTypes?: false | undefined;
621
+ recursive?: boolean | undefined;
622
+ } | BufferEncoding | null): Promise<string[]>;
623
+ function __promisify__(path: PathLike, options: "buffer" | {
624
+ encoding: "buffer";
625
+ withFileTypes?: false | undefined;
626
+ recursive?: boolean | undefined;
627
+ }): Promise<NonSharedBuffer[]>;
628
+ function __promisify__(path: PathLike, options?: (ObjectEncodingOptions & {
629
+ withFileTypes?: false | undefined;
630
+ recursive?: boolean | undefined;
631
+ }) | BufferEncoding | null): Promise<string[] | NonSharedBuffer[]>;
632
+ function __promisify__(path: PathLike, options: ObjectEncodingOptions & {
633
+ withFileTypes: true;
634
+ recursive?: boolean | undefined;
635
+ }): Promise<Dirent[]>;
636
+ function __promisify__(path: PathLike, options: {
637
+ encoding: "buffer";
638
+ withFileTypes: true;
639
+ recursive?: boolean | undefined;
640
+ }): Promise<Dirent<NonSharedBuffer>[]>;
641
+ }
642
+ function readdirSync(path: PathLike, options?: {
643
+ encoding: BufferEncoding | null;
644
+ withFileTypes?: false | undefined;
645
+ recursive?: boolean | undefined;
646
+ } | BufferEncoding | null): string[];
647
+ function readdirSync(path: PathLike, options: {
648
+ encoding: "buffer";
649
+ withFileTypes?: false | undefined;
650
+ recursive?: boolean | undefined;
651
+ } | "buffer"): NonSharedBuffer[];
652
+ function readdirSync(path: PathLike, options?: (ObjectEncodingOptions & {
653
+ withFileTypes?: false | undefined;
654
+ recursive?: boolean | undefined;
655
+ }) | BufferEncoding | null): string[] | NonSharedBuffer[];
656
+ function readdirSync(path: PathLike, options: ObjectEncodingOptions & {
657
+ withFileTypes: true;
658
+ recursive?: boolean | undefined;
659
+ }): Dirent[];
660
+ function readdirSync(path: PathLike, options: {
661
+ encoding: "buffer";
662
+ withFileTypes: true;
663
+ recursive?: boolean | undefined;
664
+ }): Dirent<NonSharedBuffer>[];
665
+ function close(fd: number, callback?: NoParamCallback): void;
666
+ namespace close {
667
+ function __promisify__(fd: number): Promise<void>;
668
+ }
669
+ function closeSync(fd: number): void;
670
+ function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
671
+ function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
672
+ function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
673
+ namespace open {
674
+ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
675
+ }
676
+ function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
677
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
678
+ namespace utimes {
679
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
680
+ }
681
+ function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
682
+ function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
683
+ namespace futimes {
684
+ function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise<void>;
685
+ }
686
+ function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
687
+ function fsync(fd: number, callback: NoParamCallback): void;
688
+ namespace fsync {
689
+ function __promisify__(fd: number): Promise<void>;
690
+ }
691
+ function fsyncSync(fd: number): void;
692
+ interface WriteOptions {
693
+ offset?: number | undefined;
694
+ length?: number | undefined;
695
+ position?: number | null | undefined;
696
+ }
697
+ function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
698
+ function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
699
+ function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
700
+ function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
701
+ function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, options: WriteOptions, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
702
+ function write(fd: number, string: string, position: number | undefined | null, encoding: BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
703
+ function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
704
+ function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
705
+ namespace write {
706
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer?: TBuffer, offset?: number, length?: number, position?: number | null): Promise<{
707
+ bytesWritten: number;
708
+ buffer: TBuffer;
709
+ }>;
710
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer?: TBuffer, options?: WriteOptions): Promise<{
711
+ bytesWritten: number;
712
+ buffer: TBuffer;
713
+ }>;
714
+ function __promisify__(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{
715
+ bytesWritten: number;
716
+ buffer: string;
717
+ }>;
718
+ }
719
+ function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
720
+ function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
721
+ type ReadPosition = number | bigint;
722
+ interface ReadOptions {
723
+ offset?: number | undefined;
724
+ length?: number | undefined;
725
+ position?: ReadPosition | null | undefined;
726
+ }
727
+ interface ReadOptionsWithBuffer<T extends NodeJS.ArrayBufferView> extends ReadOptions {
728
+ buffer?: T | undefined;
729
+ }
730
+ interface ReadSyncOptions extends ReadOptions {
731
+ }
732
+ interface ReadAsyncOptions<T extends NodeJS.ArrayBufferView> extends ReadOptionsWithBuffer<T> {
733
+ }
734
+ function read<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, offset: number, length: number, position: ReadPosition | null, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void): void;
735
+ function read<TBuffer extends NodeJS.ArrayBufferView = NonSharedBuffer>(fd: number, options: ReadOptionsWithBuffer<TBuffer>, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void): void;
736
+ function read<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, options: ReadOptions, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void): void;
737
+ function read<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void): void;
738
+ function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void): void;
739
+ namespace read {
740
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, offset: number, length: number, position: ReadPosition | null): Promise<{
741
+ bytesRead: number;
742
+ buffer: TBuffer;
743
+ }>;
744
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView = NonSharedBuffer>(fd: number, options: ReadOptionsWithBuffer<TBuffer>): Promise<{
745
+ bytesRead: number;
746
+ buffer: TBuffer;
747
+ }>;
748
+ function __promisify__(fd: number): Promise<{
749
+ bytesRead: number;
750
+ buffer: NonSharedBuffer;
751
+ }>;
752
+ }
753
+ function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number;
754
+ function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number;
755
+ function readFile(path: PathOrFileDescriptor, options: ({
756
+ encoding?: null | undefined;
757
+ flag?: string | undefined;
758
+ } & Abortable) | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void): void;
759
+ function readFile(path: PathOrFileDescriptor, options: ({
760
+ encoding: BufferEncoding;
761
+ flag?: string | undefined;
762
+ } & Abortable) | BufferEncoding, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
763
+ function readFile(path: PathOrFileDescriptor, options: (ObjectEncodingOptions & {
764
+ flag?: string | undefined;
765
+ } & Abortable) | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void): void;
766
+ function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void): void;
767
+ namespace readFile {
768
+ function __promisify__(path: PathOrFileDescriptor, options?: {
769
+ encoding?: null | undefined;
770
+ flag?: string | undefined;
771
+ } | null): Promise<NonSharedBuffer>;
772
+ function __promisify__(path: PathOrFileDescriptor, options: {
773
+ encoding: BufferEncoding;
774
+ flag?: string | undefined;
775
+ } | BufferEncoding): Promise<string>;
776
+ function __promisify__(path: PathOrFileDescriptor, options?: (ObjectEncodingOptions & {
777
+ flag?: string | undefined;
778
+ }) | BufferEncoding | null): Promise<string | NonSharedBuffer>;
779
+ }
780
+ function readFileSync(path: PathOrFileDescriptor, options?: {
781
+ encoding?: null | undefined;
782
+ flag?: string | undefined;
783
+ } | null): NonSharedBuffer;
784
+ function readFileSync(path: PathOrFileDescriptor, options: {
785
+ encoding: BufferEncoding;
786
+ flag?: string | undefined;
787
+ } | BufferEncoding): string;
788
+ function readFileSync(path: PathOrFileDescriptor, options?: (ObjectEncodingOptions & {
789
+ flag?: string | undefined;
790
+ }) | BufferEncoding | null): string | NonSharedBuffer;
791
+ type WriteFileOptions = (ObjectEncodingOptions & Abortable & {
792
+ mode?: Mode | undefined;
793
+ flag?: string | undefined;
794
+ flush?: boolean | undefined;
795
+ }) | BufferEncoding | null;
796
+ function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
797
+ function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
798
+ namespace writeFile {
799
+ function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
800
+ }
801
+ function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
802
+ function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
803
+ function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
804
+ namespace appendFile {
805
+ function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
806
+ }
807
+ function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
808
+ interface WatchFileOptions {
809
+ bigint?: boolean | undefined;
810
+ persistent?: boolean | undefined;
811
+ interval?: number | undefined;
812
+ }
813
+ function watchFile(filename: PathLike, options: (WatchFileOptions & {
814
+ bigint?: false | undefined;
815
+ }) | undefined, listener: StatsListener): StatWatcher;
816
+ function watchFile(filename: PathLike, options: (WatchFileOptions & {
817
+ bigint: true;
818
+ }) | undefined, listener: BigIntStatsListener): StatWatcher;
819
+ function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
820
+ function unwatchFile(filename: PathLike, listener?: StatsListener): void;
821
+ function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
822
+ type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean);
823
+ interface WatchOptions extends Abortable {
824
+ encoding?: BufferEncoding | "buffer" | undefined;
825
+ persistent?: boolean | undefined;
826
+ recursive?: boolean | undefined;
827
+ ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined;
828
+ }
829
+ interface WatchOptionsWithBufferEncoding extends WatchOptions {
830
+ encoding: "buffer";
831
+ }
832
+ interface WatchOptionsWithStringEncoding extends WatchOptions {
833
+ encoding?: BufferEncoding | undefined;
834
+ }
835
+ type WatchEventType = "rename" | "change";
836
+ type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
837
+ type StatsListener = (curr: Stats, prev: Stats) => void;
838
+ type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
839
+ function watch(filename: PathLike, options?: WatchOptionsWithStringEncoding | BufferEncoding | null, listener?: WatchListener<string>): FSWatcher;
840
+ function watch(filename: PathLike, options: WatchOptionsWithBufferEncoding | "buffer", listener: WatchListener<NonSharedBuffer>): FSWatcher;
841
+ function watch(filename: PathLike, options: WatchOptions | BufferEncoding | "buffer" | null, listener: WatchListener<string | NonSharedBuffer>): FSWatcher;
842
+ function watch(filename: PathLike, listener: WatchListener<string>): FSWatcher;
843
+ function exists(path: PathLike, callback: (exists: boolean) => void): void;
844
+ namespace exists {
845
+ function __promisify__(path: PathLike): Promise<boolean>;
846
+ }
847
+ function existsSync(path: PathLike): boolean;
848
+ namespace constants {
849
+ const F_OK: number;
850
+ const R_OK: number;
851
+ const W_OK: number;
852
+ const X_OK: number;
853
+ const COPYFILE_EXCL: number;
854
+ const COPYFILE_FICLONE: number;
855
+ const COPYFILE_FICLONE_FORCE: number;
856
+ const O_RDONLY: number;
857
+ const O_WRONLY: number;
858
+ const O_RDWR: number;
859
+ const O_CREAT: number;
860
+ const O_EXCL: number;
861
+ const O_NOCTTY: number;
862
+ const O_TRUNC: number;
863
+ const O_APPEND: number;
864
+ const O_DIRECTORY: number;
865
+ const O_NOATIME: number;
866
+ const O_NOFOLLOW: number;
867
+ const O_SYNC: number;
868
+ const O_DSYNC: number;
869
+ const O_SYMLINK: number;
870
+ const O_DIRECT: number;
871
+ const O_NONBLOCK: number;
872
+ const S_IFMT: number;
873
+ const S_IFREG: number;
874
+ const S_IFDIR: number;
875
+ const S_IFCHR: number;
876
+ const S_IFBLK: number;
877
+ const S_IFIFO: number;
878
+ const S_IFLNK: number;
879
+ const S_IFSOCK: number;
880
+ const S_IRWXU: number;
881
+ const S_IRUSR: number;
882
+ const S_IWUSR: number;
883
+ const S_IXUSR: number;
884
+ const S_IRWXG: number;
885
+ const S_IRGRP: number;
886
+ const S_IWGRP: number;
887
+ const S_IXGRP: number;
888
+ const S_IRWXO: number;
889
+ const S_IROTH: number;
890
+ const S_IWOTH: number;
891
+ const S_IXOTH: number;
892
+ const UV_FS_O_FILEMAP: number;
893
+ }
894
+ function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
895
+ function access(path: PathLike, callback: NoParamCallback): void;
896
+ namespace access {
897
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
898
+ }
899
+ function accessSync(path: PathLike, mode?: number): void;
900
+ interface StreamOptions {
901
+ flags?: string | undefined;
902
+ encoding?: BufferEncoding | undefined;
903
+ fd?: number | FileHandle | undefined;
904
+ mode?: number | undefined;
905
+ autoClose?: boolean | undefined;
906
+ emitClose?: boolean | undefined;
907
+ start?: number | undefined;
908
+ signal?: AbortSignal | null | undefined;
909
+ highWaterMark?: number | undefined;
910
+ }
911
+ interface FSImplementation {
912
+ open?: (...args: any[]) => any;
913
+ close?: (...args: any[]) => any;
914
+ }
915
+ interface CreateReadStreamFSImplementation extends FSImplementation {
916
+ read: (...args: any[]) => any;
917
+ }
918
+ interface CreateWriteStreamFSImplementation extends FSImplementation {
919
+ write: (...args: any[]) => any;
920
+ writev?: (...args: any[]) => any;
921
+ }
922
+ interface ReadStreamOptions extends StreamOptions {
923
+ fs?: CreateReadStreamFSImplementation | null | undefined;
924
+ end?: number | undefined;
925
+ }
926
+ interface WriteStreamOptions extends StreamOptions {
927
+ fs?: CreateWriteStreamFSImplementation | null | undefined;
928
+ flush?: boolean | undefined;
929
+ }
930
+ function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
931
+ function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
932
+ function fdatasync(fd: number, callback: NoParamCallback): void;
933
+ namespace fdatasync {
934
+ function __promisify__(fd: number): Promise<void>;
935
+ }
936
+ function fdatasyncSync(fd: number): void;
937
+ function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
938
+ function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
939
+ namespace copyFile {
940
+ function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
941
+ }
942
+ function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
943
+ function writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(fd: number, buffers: TBuffers, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void): void;
944
+ function writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(fd: number, buffers: TBuffers, position: number | null, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void): void;
945
+ interface WriteVResult<T extends readonly NodeJS.ArrayBufferView[] = NodeJS.ArrayBufferView[]> {
946
+ bytesWritten: number;
947
+ buffers: T;
948
+ }
949
+ namespace writev {
950
+ function __promisify__<TBuffers extends readonly NodeJS.ArrayBufferView[]>(fd: number, buffers: TBuffers, position?: number): Promise<WriteVResult<TBuffers>>;
951
+ }
952
+ function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
953
+ function readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(fd: number, buffers: TBuffers, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void): void;
954
+ function readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(fd: number, buffers: TBuffers, position: number | null, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void): void;
955
+ interface ReadVResult<T extends readonly NodeJS.ArrayBufferView[] = NodeJS.ArrayBufferView[]> {
956
+ bytesRead: number;
957
+ buffers: T;
958
+ }
959
+ namespace readv {
960
+ function __promisify__<TBuffers extends readonly NodeJS.ArrayBufferView[]>(fd: number, buffers: TBuffers, position?: number): Promise<ReadVResult<TBuffers>>;
961
+ }
962
+ function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
963
+ interface OpenAsBlobOptions {
964
+ type?: string | undefined;
965
+ }
966
+ function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
967
+ interface OpenDirOptions {
968
+ encoding?: BufferEncoding | undefined;
969
+ bufferSize?: number | undefined;
970
+ recursive?: boolean | undefined;
971
+ }
972
+ function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
973
+ function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
974
+ function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
975
+ namespace opendir {
976
+ function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
977
+ }
978
+ interface BigIntStats extends StatsBase<bigint> {
979
+ atimeNs: bigint;
980
+ mtimeNs: bigint;
981
+ ctimeNs: bigint;
982
+ birthtimeNs: bigint;
983
+ }
984
+ interface BigIntOptions {
985
+ bigint: true;
986
+ }
987
+ interface StatOptions {
988
+ bigint?: boolean | undefined;
989
+ throwIfNoEntry?: boolean | undefined;
990
+ }
991
+ interface StatSyncOptions extends StatOptions {
992
+ }
993
+ interface CopyOptionsBase {
994
+ dereference?: boolean | undefined;
995
+ errorOnExist?: boolean | undefined;
996
+ force?: boolean | undefined;
997
+ mode?: number | undefined;
998
+ preserveTimestamps?: boolean | undefined;
999
+ recursive?: boolean | undefined;
1000
+ verbatimSymlinks?: boolean | undefined;
1001
+ }
1002
+ interface CopyOptions extends CopyOptionsBase {
1003
+ filter?: ((source: string, destination: string) => boolean | Promise<boolean>) | undefined;
1004
+ }
1005
+ interface CopySyncOptions extends CopyOptionsBase {
1006
+ filter?: ((source: string, destination: string) => boolean) | undefined;
1007
+ }
1008
+ function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
1009
+ function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
1010
+ function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
1011
+ interface _GlobOptions<T extends Dirent | string> {
1012
+ cwd?: string | URL | undefined;
1013
+ withFileTypes?: boolean | undefined;
1014
+ exclude?: ((fileName: T) => boolean) | readonly string[] | undefined;
1015
+ }
1016
+ interface GlobOptions extends _GlobOptions<Dirent | string> {
1017
+ }
1018
+ interface GlobOptionsWithFileTypes extends _GlobOptions<Dirent> {
1019
+ withFileTypes: true;
1020
+ }
1021
+ interface GlobOptionsWithoutFileTypes extends _GlobOptions<string> {
1022
+ withFileTypes?: false | undefined;
1023
+ }
1024
+ function glob(pattern: string | readonly string[], callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void): void;
1025
+ function glob(pattern: string | readonly string[], options: GlobOptionsWithFileTypes, callback: (err: NodeJS.ErrnoException | null, matches: Dirent[]) => void): void;
1026
+ function glob(pattern: string | readonly string[], options: GlobOptionsWithoutFileTypes, callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void): void;
1027
+ function glob(pattern: string | readonly string[], options: GlobOptions, callback: (err: NodeJS.ErrnoException | null, matches: Dirent[] | string[]) => void): void;
1028
+ function globSync(pattern: string | readonly string[]): string[];
1029
+ function globSync(pattern: string | readonly string[], options: GlobOptionsWithFileTypes): Dirent[];
1030
+ function globSync(pattern: string | readonly string[], options: GlobOptionsWithoutFileTypes): string[];
1031
+ function globSync(pattern: string | readonly string[], options: GlobOptions): Dirent[] | string[];
1032
+ }
1033
+ declare module "node:fs" {
1034
+ export * as promises from "node:fs/promises";
1035
+ }
1036
+ declare module "fs" {
1037
+ export * from "node:fs";
1038
+ }