@blazetrails/ruby-compat 0.0.0-stage → 0.1.0-alpha0.2
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.
- package/LICENSE +21 -0
- package/NOTICE +6 -0
- package/README.md +440 -2
- package/dist/argument-error.d.ts +15 -0
- package/dist/argument-error.js +15 -0
- package/dist/argument-error.js.map +1 -0
- package/dist/array.d.ts +415 -0
- package/dist/array.js +1330 -0
- package/dist/array.js.map +1 -0
- package/dist/async-context-adapter.d.ts +19 -0
- package/dist/async-context-adapter.js +139 -0
- package/dist/async-context-adapter.js.map +1 -0
- package/dist/backtrace-location.d.ts +78 -0
- package/dist/backtrace-location.js +158 -0
- package/dist/backtrace-location.js.map +1 -0
- package/dist/base64.d.ts +73 -0
- package/dist/base64.js +164 -0
- package/dist/base64.js.map +1 -0
- package/dist/benchmark.d.ts +19 -0
- package/dist/benchmark.js +16 -0
- package/dist/benchmark.js.map +1 -0
- package/dist/big-decimal.d.ts +111 -0
- package/dist/big-decimal.js +584 -0
- package/dist/big-decimal.js.map +1 -0
- package/dist/bundler.d.ts +44 -0
- package/dist/bundler.js +97 -0
- package/dist/bundler.js.map +1 -0
- package/dist/cgi.d.ts +89 -0
- package/dist/cgi.js +168 -0
- package/dist/cgi.js.map +1 -0
- package/dist/child-process-adapter.d.ts +110 -0
- package/dist/child-process-adapter.js +272 -0
- package/dist/child-process-adapter.js.map +1 -0
- package/dist/class-module.d.ts +10 -0
- package/dist/class-module.js +10 -0
- package/dist/class-module.js.map +1 -0
- package/dist/classpath.d.ts +93 -0
- package/dist/classpath.js +210 -0
- package/dist/classpath.js.map +1 -0
- package/dist/closed-queue-error.d.ts +10 -0
- package/dist/closed-queue-error.js +10 -0
- package/dist/closed-queue-error.js.map +1 -0
- package/dist/comparable.d.ts +127 -0
- package/dist/comparable.js +376 -0
- package/dist/comparable.js.map +1 -0
- package/dist/complex.d.ts +49 -0
- package/dist/complex.js +164 -0
- package/dist/complex.js.map +1 -0
- package/dist/concurrent/atomic-boolean.d.ts +24 -0
- package/dist/concurrent/atomic-boolean.js +43 -0
- package/dist/concurrent/atomic-boolean.js.map +1 -0
- package/dist/concurrent/atomic-fixnum.d.ts +21 -0
- package/dist/concurrent/atomic-fixnum.js +35 -0
- package/dist/concurrent/atomic-fixnum.js.map +1 -0
- package/dist/concurrent/count-down-latch.d.ts +20 -0
- package/dist/concurrent/count-down-latch.js +50 -0
- package/dist/concurrent/count-down-latch.js.map +1 -0
- package/dist/concurrent/cyclic-barrier.d.ts +18 -0
- package/dist/concurrent/cyclic-barrier.js +50 -0
- package/dist/concurrent/cyclic-barrier.js.map +1 -0
- package/dist/concurrent/event.d.ts +19 -0
- package/dist/concurrent/event.js +31 -0
- package/dist/concurrent/event.js.map +1 -0
- package/dist/concurrent/map.d.ts +149 -0
- package/dist/concurrent/map.js +202 -0
- package/dist/concurrent/map.js.map +1 -0
- package/dist/concurrent/read-write-lock.d.ts +25 -0
- package/dist/concurrent/read-write-lock.js +70 -0
- package/dist/concurrent/read-write-lock.js.map +1 -0
- package/dist/concurrent/semaphore.d.ts +24 -0
- package/dist/concurrent/semaphore.js +74 -0
- package/dist/concurrent/semaphore.js.map +1 -0
- package/dist/concurrent/timer-task.d.ts +52 -0
- package/dist/concurrent/timer-task.js +112 -0
- package/dist/concurrent/timer-task.js.map +1 -0
- package/dist/constants.generated.d.ts +2 -0
- package/dist/constants.generated.js +64 -0
- package/dist/constants.generated.js.map +1 -0
- package/dist/converter-not-found-error.d.ts +14 -0
- package/dist/converter-not-found-error.js +14 -0
- package/dist/converter-not-found-error.js.map +1 -0
- package/dist/crypto-adapter.d.ts +64 -0
- package/dist/crypto-adapter.js +365 -0
- package/dist/crypto-adapter.js.map +1 -0
- package/dist/delegate.d.ts +156 -0
- package/dist/delegate.js +306 -0
- package/dist/delegate.js.map +1 -0
- package/dist/digest.d.ts +99 -0
- package/dist/digest.js +131 -0
- package/dist/digest.js.map +1 -0
- package/dist/dir.d.ts +225 -0
- package/dist/dir.js +608 -0
- package/dist/dir.js.map +1 -0
- package/dist/encoding-error.d.ts +14 -0
- package/dist/encoding-error.js +17 -0
- package/dist/encoding-error.js.map +1 -0
- package/dist/encoding.d.ts +121 -0
- package/dist/encoding.js +306 -0
- package/dist/encoding.js.map +1 -0
- package/dist/ensure.d.ts +15 -0
- package/dist/ensure.js +35 -0
- package/dist/ensure.js.map +1 -0
- package/dist/enumerable.d.ts +375 -0
- package/dist/enumerable.js +1102 -0
- package/dist/enumerable.js.map +1 -0
- package/dist/enumerator.d.ts +324 -0
- package/dist/enumerator.js +625 -0
- package/dist/enumerator.js.map +1 -0
- package/dist/eof-error.d.ts +14 -0
- package/dist/eof-error.js +14 -0
- package/dist/eof-error.js.map +1 -0
- package/dist/errno.d.ts +447 -0
- package/dist/errno.js +616 -0
- package/dist/errno.js.map +1 -0
- package/dist/exc-detailed-message.d.ts +15 -0
- package/dist/exc-detailed-message.js +106 -0
- package/dist/exc-detailed-message.js.map +1 -0
- package/dist/exc-to-s.d.ts +10 -0
- package/dist/exc-to-s.js +21 -0
- package/dist/exc-to-s.js.map +1 -0
- package/dist/exception.d.ts +44 -0
- package/dist/exception.js +115 -0
- package/dist/exception.js.map +1 -0
- package/dist/fiber-error.d.ts +12 -0
- package/dist/fiber-error.js +12 -0
- package/dist/fiber-error.js.map +1 -0
- package/dist/fiber.d.ts +51 -0
- package/dist/fiber.js +178 -0
- package/dist/fiber.js.map +1 -0
- package/dist/file-utils.d.ts +480 -0
- package/dist/file-utils.js +1824 -0
- package/dist/file-utils.js.map +1 -0
- package/dist/file.d.ts +643 -0
- package/dist/file.js +1334 -0
- package/dist/file.js.map +1 -0
- package/dist/float-domain-error.d.ts +17 -0
- package/dist/float-domain-error.js +17 -0
- package/dist/float-domain-error.js.map +1 -0
- package/dist/fork-children.d.ts +23 -0
- package/dist/fork-children.js +32 -0
- package/dist/fork-children.js.map +1 -0
- package/dist/frozen-error.d.ts +33 -0
- package/dist/frozen-error.js +41 -0
- package/dist/frozen-error.js.map +1 -0
- package/dist/fs-adapter.d.ts +158 -0
- package/dist/fs-adapter.js +253 -0
- package/dist/fs-adapter.js.map +1 -0
- package/dist/gem/deprecate.d.ts +10 -0
- package/dist/gem/deprecate.js +8 -0
- package/dist/gem/deprecate.js.map +1 -0
- package/dist/gem/requirement.d.ts +55 -0
- package/dist/gem/requirement.js +91 -0
- package/dist/gem/requirement.js.map +1 -0
- package/dist/gem/version.d.ts +50 -0
- package/dist/gem/version.js +148 -0
- package/dist/gem/version.js.map +1 -0
- package/dist/gem.d.ts +59 -0
- package/dist/gem.js +82 -0
- package/dist/gem.js.map +1 -0
- package/dist/hash.d.ts +967 -0
- package/dist/hash.js +1572 -0
- package/dist/hash.js.map +1 -0
- package/dist/http-adapter.d.ts +124 -0
- package/dist/http-adapter.js +220 -0
- package/dist/http-adapter.js.map +1 -0
- package/dist/immediate-executor.d.ts +20 -0
- package/dist/immediate-executor.js +39 -0
- package/dist/immediate-executor.js.map +1 -0
- package/dist/include.d.ts +778 -0
- package/dist/include.js +2208 -0
- package/dist/include.js.map +1 -0
- package/dist/index-error.d.ts +13 -0
- package/dist/index-error.js +13 -0
- package/dist/index-error.js.map +1 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +166 -0
- package/dist/index.js.map +1 -0
- package/dist/invalid-byte-sequence-error.d.ts +62 -0
- package/dist/invalid-byte-sequence-error.js +75 -0
- package/dist/invalid-byte-sequence-error.js.map +1 -0
- package/dist/io-error.d.ts +14 -0
- package/dist/io-error.js +17 -0
- package/dist/io-error.js.map +1 -0
- package/dist/io.d.ts +867 -0
- package/dist/io.js +1960 -0
- package/dist/io.js.map +1 -0
- package/dist/ipaddr.d.ts +79 -0
- package/dist/ipaddr.js +405 -0
- package/dist/ipaddr.js.map +1 -0
- package/dist/json.d.ts +70 -0
- package/dist/json.js +181 -0
- package/dist/json.js.map +1 -0
- package/dist/kernel-catch.d.ts +59 -0
- package/dist/kernel-catch.js +184 -0
- package/dist/kernel-catch.js.map +1 -0
- package/dist/kernel-float.d.ts +19 -0
- package/dist/kernel-float.js +54 -0
- package/dist/kernel-float.js.map +1 -0
- package/dist/kernel-fork.d.ts +30 -0
- package/dist/kernel-fork.js +72 -0
- package/dist/kernel-fork.js.map +1 -0
- package/dist/kernel-format.d.ts +27 -0
- package/dist/kernel-format.js +901 -0
- package/dist/kernel-format.js.map +1 -0
- package/dist/kernel-hash.d.ts +7 -0
- package/dist/kernel-hash.js +33 -0
- package/dist/kernel-hash.js.map +1 -0
- package/dist/kernel-integer.d.ts +49 -0
- package/dist/kernel-integer.js +170 -0
- package/dist/kernel-integer.js.map +1 -0
- package/dist/kernel-rand.d.ts +16 -0
- package/dist/kernel-rand.js +237 -0
- package/dist/kernel-rand.js.map +1 -0
- package/dist/kernel-system.d.ts +39 -0
- package/dist/kernel-system.js +103 -0
- package/dist/kernel-system.js.map +1 -0
- package/dist/kernel-warn.d.ts +35 -0
- package/dist/kernel-warn.js +73 -0
- package/dist/kernel-warn.js.map +1 -0
- package/dist/key-error.d.ts +44 -0
- package/dist/key-error.js +59 -0
- package/dist/key-error.js.map +1 -0
- package/dist/keyword-splat.d.ts +41 -0
- package/dist/keyword-splat.js +65 -0
- package/dist/keyword-splat.js.map +1 -0
- package/dist/load-error.d.ts +19 -0
- package/dist/load-error.js +19 -0
- package/dist/load-error.js.map +1 -0
- package/dist/load.d.ts +128 -0
- package/dist/load.js +278 -0
- package/dist/load.js.map +1 -0
- package/dist/loaded-features.d.ts +13 -0
- package/dist/loaded-features.js +15 -0
- package/dist/loaded-features.js.map +1 -0
- package/dist/local-jump-error.d.ts +12 -0
- package/dist/local-jump-error.js +12 -0
- package/dist/local-jump-error.js.map +1 -0
- package/dist/logger/formatter.d.ts +21 -0
- package/dist/logger/formatter.js +43 -0
- package/dist/logger/formatter.js.map +1 -0
- package/dist/logger/log-device.d.ts +52 -0
- package/dist/logger/log-device.js +104 -0
- package/dist/logger/log-device.js.map +1 -0
- package/dist/logger/severity.d.ts +23 -0
- package/dist/logger/severity.js +42 -0
- package/dist/logger/severity.js.map +1 -0
- package/dist/logger.d.ts +127 -0
- package/dist/logger.js +218 -0
- package/dist/logger.js.map +1 -0
- package/dist/marshal.d.ts +83 -0
- package/dist/marshal.js +1487 -0
- package/dist/marshal.js.map +1 -0
- package/dist/match-data.d.ts +161 -0
- package/dist/match-data.js +284 -0
- package/dist/match-data.js.map +1 -0
- package/dist/method-cache.d.ts +81 -0
- package/dist/method-cache.js +109 -0
- package/dist/method-cache.js.map +1 -0
- package/dist/method-missing-proxy.d.ts +53 -0
- package/dist/method-missing-proxy.js +154 -0
- package/dist/method-missing-proxy.js.map +1 -0
- package/dist/method.d.ts +132 -0
- package/dist/method.js +320 -0
- package/dist/method.js.map +1 -0
- package/dist/monitor.d.ts +114 -0
- package/dist/monitor.js +270 -0
- package/dist/monitor.js.map +1 -0
- package/dist/mutex.d.ts +51 -0
- package/dist/mutex.js +150 -0
- package/dist/mutex.js.map +1 -0
- package/dist/name-error.d.ts +45 -0
- package/dist/name-error.js +54 -0
- package/dist/name-error.js.map +1 -0
- package/dist/net/http/exceptions.d.ts +31 -0
- package/dist/net/http/exceptions.js +46 -0
- package/dist/net/http/exceptions.js.map +1 -0
- package/dist/net/http/request.d.ts +137 -0
- package/dist/net/http/request.js +559 -0
- package/dist/net/http/request.js.map +1 -0
- package/dist/net/http/requests.d.ts +197 -0
- package/dist/net/http/requests.js +197 -0
- package/dist/net/http/requests.js.map +1 -0
- package/dist/net/http/response.d.ts +141 -0
- package/dist/net/http/response.js +416 -0
- package/dist/net/http/response.js.map +1 -0
- package/dist/net/http/responses.d.ts +345 -0
- package/dist/net/http/responses.js +486 -0
- package/dist/net/http/responses.js.map +1 -0
- package/dist/net/http.d.ts +278 -0
- package/dist/net/http.js +760 -0
- package/dist/net/http.js.map +1 -0
- package/dist/net/protocol.d.ts +227 -0
- package/dist/net/protocol.js +392 -0
- package/dist/net/protocol.js.map +1 -0
- package/dist/nil-class.d.ts +10 -0
- package/dist/nil-class.js +27 -0
- package/dist/nil-class.js.map +1 -0
- package/dist/no-method-error.d.ts +38 -0
- package/dist/no-method-error.js +45 -0
- package/dist/no-method-error.js.map +1 -0
- package/dist/not-implemented-error.d.ts +13 -0
- package/dist/not-implemented-error.js +13 -0
- package/dist/not-implemented-error.js.map +1 -0
- package/dist/numeric-class.d.ts +29 -0
- package/dist/numeric-class.js +41 -0
- package/dist/numeric-class.js.map +1 -0
- package/dist/numeric.d.ts +226 -0
- package/dist/numeric.js +848 -0
- package/dist/numeric.js.map +1 -0
- package/dist/object-space.d.ts +34 -0
- package/dist/object-space.js +152 -0
- package/dist/object-space.js.map +1 -0
- package/dist/object.d.ts +833 -0
- package/dist/object.js +2131 -0
- package/dist/object.js.map +1 -0
- package/dist/open-uri.d.ts +180 -0
- package/dist/open-uri.js +402 -0
- package/dist/open-uri.js.map +1 -0
- package/dist/open3.d.ts +69 -0
- package/dist/open3.js +134 -0
- package/dist/open3.js.map +1 -0
- package/dist/openssl.d.ts +479 -0
- package/dist/openssl.js +1052 -0
- package/dist/openssl.js.map +1 -0
- package/dist/optparse.d.ts +130 -0
- package/dist/optparse.js +457 -0
- package/dist/optparse.js.map +1 -0
- package/dist/os-adapter.d.ts +20 -0
- package/dist/os-adapter.js +95 -0
- package/dist/os-adapter.js.map +1 -0
- package/dist/pathname.d.ts +73 -0
- package/dist/pathname.js +412 -0
- package/dist/pathname.js.map +1 -0
- package/dist/pp.d.ts +60 -0
- package/dist/pp.js +195 -0
- package/dist/pp.js.map +1 -0
- package/dist/pretty-print.d.ts +89 -0
- package/dist/pretty-print.js +232 -0
- package/dist/pretty-print.js.map +1 -0
- package/dist/process-adapter.d.ts +229 -0
- package/dist/process-adapter.js +889 -0
- package/dist/process-adapter.js.map +1 -0
- package/dist/process.d.ts +202 -0
- package/dist/process.js +433 -0
- package/dist/process.js.map +1 -0
- package/dist/psych/class-loader.d.ts +92 -0
- package/dist/psych/class-loader.js +139 -0
- package/dist/psych/class-loader.js.map +1 -0
- package/dist/psych/coder.d.ts +144 -0
- package/dist/psych/coder.js +176 -0
- package/dist/psych/coder.js.map +1 -0
- package/dist/psych/core-ext.d.ts +8 -0
- package/dist/psych/core-ext.js +10 -0
- package/dist/psych/core-ext.js.map +1 -0
- package/dist/psych/emitter.d.ts +116 -0
- package/dist/psych/emitter.js +1130 -0
- package/dist/psych/emitter.js.map +1 -0
- package/dist/psych/exception.d.ts +43 -0
- package/dist/psych/exception.js +54 -0
- package/dist/psych/exception.js.map +1 -0
- package/dist/psych/handler.d.ts +59 -0
- package/dist/psych/handler.js +95 -0
- package/dist/psych/handler.js.map +1 -0
- package/dist/psych/handlers/document-stream.d.ts +17 -0
- package/dist/psych/handlers/document-stream.js +26 -0
- package/dist/psych/handlers/document-stream.js.map +1 -0
- package/dist/psych/nodes/alias.d.ts +15 -0
- package/dist/psych/nodes/alias.js +22 -0
- package/dist/psych/nodes/alias.js.map +1 -0
- package/dist/psych/nodes/document.d.ts +23 -0
- package/dist/psych/nodes/document.js +35 -0
- package/dist/psych/nodes/document.js.map +1 -0
- package/dist/psych/nodes/mapping.d.ts +25 -0
- package/dist/psych/nodes/mapping.js +35 -0
- package/dist/psych/nodes/mapping.js.map +1 -0
- package/dist/psych/nodes/node.d.ts +59 -0
- package/dist/psych/nodes/node.js +79 -0
- package/dist/psych/nodes/node.js.map +1 -0
- package/dist/psych/nodes/scalar.d.ts +35 -0
- package/dist/psych/nodes/scalar.js +47 -0
- package/dist/psych/nodes/scalar.js.map +1 -0
- package/dist/psych/nodes/sequence.d.ts +25 -0
- package/dist/psych/nodes/sequence.js +35 -0
- package/dist/psych/nodes/sequence.js.map +1 -0
- package/dist/psych/nodes/stream.d.ts +23 -0
- package/dist/psych/nodes/stream.js +31 -0
- package/dist/psych/nodes/stream.js.map +1 -0
- package/dist/psych/omap.d.ts +9 -0
- package/dist/psych/omap.js +9 -0
- package/dist/psych/omap.js.map +1 -0
- package/dist/psych/parser.d.ts +41 -0
- package/dist/psych/parser.js +139 -0
- package/dist/psych/parser.js.map +1 -0
- package/dist/psych/scalar-scanner.d.ts +31 -0
- package/dist/psych/scalar-scanner.js +169 -0
- package/dist/psych/scalar-scanner.js.map +1 -0
- package/dist/psych/syntax-error.d.ts +23 -0
- package/dist/psych/syntax-error.js +35 -0
- package/dist/psych/syntax-error.js.map +1 -0
- package/dist/psych/tree-builder.d.ts +51 -0
- package/dist/psych/tree-builder.js +118 -0
- package/dist/psych/tree-builder.js.map +1 -0
- package/dist/psych/visitors/depth-first.d.ts +27 -0
- package/dist/psych/visitors/depth-first.js +37 -0
- package/dist/psych/visitors/depth-first.js.map +1 -0
- package/dist/psych/visitors/emitter.d.ts +32 -0
- package/dist/psych/visitors/emitter.js +63 -0
- package/dist/psych/visitors/emitter.js.map +1 -0
- package/dist/psych/visitors/to-ruby.d.ts +110 -0
- package/dist/psych/visitors/to-ruby.js +396 -0
- package/dist/psych/visitors/to-ruby.js.map +1 -0
- package/dist/psych/visitors/visitor.d.ts +11 -0
- package/dist/psych/visitors/visitor.js +17 -0
- package/dist/psych/visitors/visitor.js.map +1 -0
- package/dist/psych/visitors/yaml-tree.d.ts +182 -0
- package/dist/psych/visitors/yaml-tree.js +593 -0
- package/dist/psych/visitors/yaml-tree.js.map +1 -0
- package/dist/psych-adapter.d.ts +65 -0
- package/dist/psych-adapter.js +121 -0
- package/dist/psych-adapter.js.map +1 -0
- package/dist/psych-yaml.d.ts +2 -0
- package/dist/psych-yaml.js +5 -0
- package/dist/psych-yaml.js.map +1 -0
- package/dist/psych.d.ts +257 -0
- package/dist/psych.js +332 -0
- package/dist/psych.js.map +1 -0
- package/dist/queue.d.ts +137 -0
- package/dist/queue.js +236 -0
- package/dist/queue.js.map +1 -0
- package/dist/racc/parser.d.ts +70 -0
- package/dist/racc/parser.js +206 -0
- package/dist/racc/parser.js.map +1 -0
- package/dist/range-error.d.ts +15 -0
- package/dist/range-error.js +15 -0
- package/dist/range-error.js.map +1 -0
- package/dist/range.d.ts +166 -0
- package/dist/range.js +421 -0
- package/dist/range.js.map +1 -0
- package/dist/rational.d.ts +168 -0
- package/dist/rational.js +587 -0
- package/dist/rational.js.map +1 -0
- package/dist/rb-config.d.ts +33 -0
- package/dist/rb-config.js +53 -0
- package/dist/rb-config.js.map +1 -0
- package/dist/rb-equal.d.ts +66 -0
- package/dist/rb-equal.js +262 -0
- package/dist/rb-equal.js.map +1 -0
- package/dist/rb-hash.d.ts +26 -0
- package/dist/rb-hash.js +108 -0
- package/dist/rb-hash.js.map +1 -0
- package/dist/regexp.d.ts +82 -0
- package/dist/regexp.js +191 -0
- package/dist/regexp.js.map +1 -0
- package/dist/repl-adapter.d.ts +270 -0
- package/dist/repl-adapter.js +562 -0
- package/dist/repl-adapter.js.map +1 -0
- package/dist/resolv.d.ts +30 -0
- package/dist/resolv.js +48 -0
- package/dist/resolv.js.map +1 -0
- package/dist/ruby-empty.d.ts +28 -0
- package/dist/ruby-empty.js +40 -0
- package/dist/ruby-empty.js.map +1 -0
- package/dist/ruby-platform.d.ts +39 -0
- package/dist/ruby-platform.js +49 -0
- package/dist/ruby-platform.js.map +1 -0
- package/dist/runtime-error.d.ts +15 -0
- package/dist/runtime-error.js +15 -0
- package/dist/runtime-error.js.map +1 -0
- package/dist/scheduled-task.d.ts +73 -0
- package/dist/scheduled-task.js +150 -0
- package/dist/scheduled-task.js.map +1 -0
- package/dist/secure-random.d.ts +50 -0
- package/dist/secure-random.js +141 -0
- package/dist/secure-random.js.map +1 -0
- package/dist/set.d.ts +158 -0
- package/dist/set.js +352 -0
- package/dist/set.js.map +1 -0
- package/dist/shellwords.d.ts +27 -0
- package/dist/shellwords.js +53 -0
- package/dist/shellwords.js.map +1 -0
- package/dist/signal-exception.d.ts +43 -0
- package/dist/signal-exception.js +88 -0
- package/dist/signal-exception.js.map +1 -0
- package/dist/socket.d.ts +230 -0
- package/dist/socket.js +484 -0
- package/dist/socket.js.map +1 -0
- package/dist/standard-error.d.ts +27 -0
- package/dist/standard-error.js +49 -0
- package/dist/standard-error.js.map +1 -0
- package/dist/stop-iteration.d.ts +10 -0
- package/dist/stop-iteration.js +10 -0
- package/dist/stop-iteration.js.map +1 -0
- package/dist/string/b.d.ts +19 -0
- package/dist/string/b.js +28 -0
- package/dist/string/b.js.map +1 -0
- package/dist/string/byte-methods.d.ts +57 -0
- package/dist/string/byte-methods.js +266 -0
- package/dist/string/byte-methods.js.map +1 -0
- package/dist/string/bytes.d.ts +35 -0
- package/dist/string/bytes.js +123 -0
- package/dist/string/bytes.js.map +1 -0
- package/dist/string/case-mapping.d.ts +57 -0
- package/dist/string/case-mapping.js +192 -0
- package/dist/string/case-mapping.js.map +1 -0
- package/dist/string/chomp.d.ts +15 -0
- package/dist/string/chomp.js +32 -0
- package/dist/string/chomp.js.map +1 -0
- package/dist/string/convert.d.ts +55 -0
- package/dist/string/convert.js +316 -0
- package/dist/string/convert.js.map +1 -0
- package/dist/string/delete.d.ts +14 -0
- package/dist/string/delete.js +17 -0
- package/dist/string/delete.js.map +1 -0
- package/dist/string/each.d.ts +108 -0
- package/dist/string/each.js +305 -0
- package/dist/string/each.js.map +1 -0
- package/dist/string/encode.d.ts +37 -0
- package/dist/string/encode.js +268 -0
- package/dist/string/encode.js.map +1 -0
- package/dist/string/force-encoding.d.ts +72 -0
- package/dist/string/force-encoding.js +147 -0
- package/dist/string/force-encoding.js.map +1 -0
- package/dist/string/inspect.d.ts +17 -0
- package/dist/string/inspect.js +81 -0
- package/dist/string/inspect.js.map +1 -0
- package/dist/string/method-table.d.ts +174 -0
- package/dist/string/method-table.js +805 -0
- package/dist/string/method-table.js.map +1 -0
- package/dist/string/scrub.d.ts +12 -0
- package/dist/string/scrub.js +33 -0
- package/dist/string/scrub.js.map +1 -0
- package/dist/string/slice.d.ts +26 -0
- package/dist/string/slice.js +73 -0
- package/dist/string/slice.js.map +1 -0
- package/dist/string/split.d.ts +11 -0
- package/dist/string/split.js +44 -0
- package/dist/string/split.js.map +1 -0
- package/dist/string/sub.d.ts +114 -0
- package/dist/string/sub.js +371 -0
- package/dist/string/sub.js.map +1 -0
- package/dist/string/succ.d.ts +14 -0
- package/dist/string/succ.js +118 -0
- package/dist/string/succ.js.map +1 -0
- package/dist/string/support.d.ts +142 -0
- package/dist/string/support.js +296 -0
- package/dist/string/support.js.map +1 -0
- package/dist/string/tr.d.ts +46 -0
- package/dist/string/tr.js +156 -0
- package/dist/string/tr.js.map +1 -0
- package/dist/string-io.d.ts +166 -0
- package/dist/string-io.js +248 -0
- package/dist/string-io.js.map +1 -0
- package/dist/string-scanner.d.ts +133 -0
- package/dist/string-scanner.js +248 -0
- package/dist/string-scanner.js.map +1 -0
- package/dist/struct.d.ts +54 -0
- package/dist/struct.js +222 -0
- package/dist/struct.js.map +1 -0
- package/dist/symbol.d.ts +48 -0
- package/dist/symbol.js +107 -0
- package/dist/symbol.js.map +1 -0
- package/dist/tempfile.d.ts +173 -0
- package/dist/tempfile.js +295 -0
- package/dist/tempfile.js.map +1 -0
- package/dist/temporal-tag.d.ts +23 -0
- package/dist/temporal-tag.js +29 -0
- package/dist/temporal-tag.js.map +1 -0
- package/dist/thread-error.d.ts +13 -0
- package/dist/thread-error.js +13 -0
- package/dist/thread-error.js.map +1 -0
- package/dist/thread-pool-executor.d.ts +121 -0
- package/dist/thread-pool-executor.js +254 -0
- package/dist/thread-pool-executor.js.map +1 -0
- package/dist/thread.d.ts +211 -0
- package/dist/thread.js +495 -0
- package/dist/thread.js.map +1 -0
- package/dist/timeout.d.ts +29 -0
- package/dist/timeout.js +41 -0
- package/dist/timeout.js.map +1 -0
- package/dist/tse.d.ts +40 -0
- package/dist/tse.js +66 -0
- package/dist/tse.js.map +1 -0
- package/dist/type-error.d.ts +14 -0
- package/dist/type-error.js +14 -0
- package/dist/type-error.js.map +1 -0
- package/dist/undefined-conversion-error.d.ts +10 -0
- package/dist/undefined-conversion-error.js +10 -0
- package/dist/undefined-conversion-error.js.map +1 -0
- package/dist/uri/common.d.ts +209 -0
- package/dist/uri/common.js +369 -0
- package/dist/uri/common.js.map +1 -0
- package/dist/uri/generic.d.ts +280 -0
- package/dist/uri/generic.js +806 -0
- package/dist/uri/generic.js.map +1 -0
- package/dist/uri/http.d.ts +23 -0
- package/dist/uri/http.js +30 -0
- package/dist/uri/http.js.map +1 -0
- package/dist/uri/https.d.ts +13 -0
- package/dist/uri/https.js +15 -0
- package/dist/uri/https.js.map +1 -0
- package/dist/uri/rfc2396-parser.d.ts +70 -0
- package/dist/uri/rfc2396-parser.js +264 -0
- package/dist/uri/rfc2396-parser.js.map +1 -0
- package/dist/uri/rfc3986-parser.d.ts +46 -0
- package/dist/uri/rfc3986-parser.js +171 -0
- package/dist/uri/rfc3986-parser.js.map +1 -0
- package/dist/uri.d.ts +13 -0
- package/dist/uri.js +13 -0
- package/dist/uri.js.map +1 -0
- package/dist/variable.d.ts +183 -0
- package/dist/variable.js +463 -0
- package/dist/variable.js.map +1 -0
- package/dist/verbose.d.ts +39 -0
- package/dist/verbose.js +49 -0
- package/dist/verbose.js.map +1 -0
- package/dist/yaml.d.ts +9 -0
- package/dist/yaml.js +9 -0
- package/dist/yaml.js.map +1 -0
- package/dist/zlib-adapter.d.ts +119 -0
- package/dist/zlib-adapter.js +230 -0
- package/dist/zlib-adapter.js.map +1 -0
- package/dist/zlib.d.ts +299 -0
- package/dist/zlib.js +679 -0
- package/dist/zlib.js.map +1 -0
- package/package.json +172 -3
package/dist/file.d.ts
ADDED
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
import { Encoding } from "./encoding.js";
|
|
2
|
+
import type { FsStatResult } from "./fs-adapter.js";
|
|
3
|
+
import { IO } from "./io.js";
|
|
4
|
+
/** @noRailsEquivalent PERMANENT */
|
|
5
|
+
export type PathLike = {
|
|
6
|
+
toPath(): string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* `rb_get_path` (`vendor/ruby/v3.3.11/file.c:246`), the `FilePathValue` conversion:
|
|
10
|
+
* a String is the path, anything else is asked for `to_path`, and the answer (the
|
|
11
|
+
* object itself where it has no `to_path`) goes through `StringValue`
|
|
12
|
+
* (`rb_get_path_check_to_string`, `file.c:212-224`). A path holding a NUL raises
|
|
13
|
+
* `ArgumentError` (`rb_get_path_check_convert`, `vendor/ruby/v3.3.11/file.c:232-234`).
|
|
14
|
+
*
|
|
15
|
+
* @noRailsEquivalent PERMANENT — `vendor/ruby/v3.3.11/file.c:246`
|
|
16
|
+
*/
|
|
17
|
+
export declare function rbGetPath(obj: unknown): string;
|
|
18
|
+
type FileJoinArg = string | PathLike | readonly FileJoinArg[];
|
|
19
|
+
/**
|
|
20
|
+
* The keyword hash `rb_scan_open_args` scans off `File.open`'s arguments
|
|
21
|
+
* (`vendor/ruby/v3.3.11/io.c:8088`), as far as `rb_io_extract_modeenc` reads
|
|
22
|
+
* it: `mode:` (`io.c:6923`), `binmode:` (`io.c:6834`), `perm:` and
|
|
23
|
+
* `external_encoding:`.
|
|
24
|
+
*/
|
|
25
|
+
export interface FileOpenOpt {
|
|
26
|
+
mode?: string;
|
|
27
|
+
binmode?: boolean;
|
|
28
|
+
perm?: number;
|
|
29
|
+
externalEncoding?: Encoding | string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `File` (`vendor/ruby/v3.3.11/file.c:7354` `rb_cFile`), the sliver of it trails calls.
|
|
33
|
+
*
|
|
34
|
+
* Rails reaches the filesystem through this class — `File.exist?(key)` in
|
|
35
|
+
* `vendor/rails/v8.0.5.2/activesupport/lib/active_support/cache/file_store.rb:125`,
|
|
36
|
+
* `File.join(cache_path, ...)` at `file_store.rb:185`,
|
|
37
|
+
* `File.realpath(dir)` at `file_store.rb:196` — so trails reaches it through a
|
|
38
|
+
* class of the same name rather than through members named after node's `fs`.
|
|
39
|
+
* The backend a member lands on is the `FsAdapter` contract in
|
|
40
|
+
* `./fs-adapter.js`; a platform registers one, and nothing here names a
|
|
41
|
+
* runtime.
|
|
42
|
+
*
|
|
43
|
+
* Only the members ported bodies call are here. `File::SEPARATOR` is `"/"` on
|
|
44
|
+
* every platform (`vendor/ruby/v3.3.11/file.c:7427`); the backslash is
|
|
45
|
+
* `File::ALT_SEPARATOR`, which is `nil` off DOSISH (`file.c:7435`).
|
|
46
|
+
*
|
|
47
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File` (`vendor/ruby/v3.3.11/file.c:7354`),
|
|
48
|
+
* which Rails calls without defining, so no Rails or gem file declares the
|
|
49
|
+
* class this file's single export lives in.
|
|
50
|
+
*/
|
|
51
|
+
export declare class File extends IO {
|
|
52
|
+
/**
|
|
53
|
+
* `rb_file_initialize` (`vendor/ruby/v3.3.11/io.c:9616`) over `rb_open_file`
|
|
54
|
+
* (`io.c:8102`): `File.new(filename, mode = "r", opt)` opens the named file.
|
|
55
|
+
* Ruby's mode string carries the binary flag node's `flags` has no letter
|
|
56
|
+
* for, so `b` is dropped from the flags and recorded on the stream instead
|
|
57
|
+
* (`rb_io_binmode`, `io.c:6311`), and everything after the first `:` is
|
|
58
|
+
* `parse_mode_enc`'s encoding (`io.c:6667,6883-6886`).
|
|
59
|
+
*
|
|
60
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.new`
|
|
61
|
+
* (`vendor/ruby/v3.3.11/io.c:9616`).
|
|
62
|
+
*
|
|
63
|
+
* An Integer `fileName` is `rb_file_initialize`'s fd arm, `rb_io_initialize`
|
|
64
|
+
* over a descriptor already open, which has no path.
|
|
65
|
+
*/
|
|
66
|
+
constructor(fileName: string | number, mode?: string | FileOpenOpt, opt?: FileOpenOpt);
|
|
67
|
+
/**
|
|
68
|
+
* `vendor/ruby/v3.3.11/file.c:7427` — `File::SEPARATOR`, `"/"` on every platform.
|
|
69
|
+
*
|
|
70
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::SEPARATOR`.
|
|
71
|
+
*/
|
|
72
|
+
static readonly SEPARATOR = "/";
|
|
73
|
+
/**
|
|
74
|
+
* `vendor/ruby/v3.3.11/file.c:7433` — `File::ALT_SEPARATOR`, the `'\\'` of
|
|
75
|
+
* `FILE_ALT_SEPARATOR` (`file.c:3303`) where the build is DOSISH, and `nil`
|
|
76
|
+
* everywhere else (`file.c:7435`). The platform answer comes from the
|
|
77
|
+
* registered path backend's separator rather than from a runtime global.
|
|
78
|
+
*
|
|
79
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::ALT_SEPARATOR`.
|
|
80
|
+
*/
|
|
81
|
+
static get ALT_SEPARATOR(): string | null;
|
|
82
|
+
/**
|
|
83
|
+
* `vendor/ruby/v3.3.11/file.c:7440` — `File::PATH_SEPARATOR`, the `';'` of a DOSISH
|
|
84
|
+
* build and `':'` everywhere else. The platform answer comes from the
|
|
85
|
+
* registered path backend's separator, as `ALT_SEPARATOR` above does.
|
|
86
|
+
*
|
|
87
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::PATH_SEPARATOR`.
|
|
88
|
+
*/
|
|
89
|
+
static get PATH_SEPARATOR(): string;
|
|
90
|
+
/**
|
|
91
|
+
* `vendor/ruby/v3.3.11/file.c:7841` — `File::LOCK_EX`, the exclusive-lock operation
|
|
92
|
+
* `File#flock` takes (`file.c:5198`).
|
|
93
|
+
*
|
|
94
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::LOCK_EX`.
|
|
95
|
+
*/
|
|
96
|
+
static readonly LOCK_EX = 2;
|
|
97
|
+
/**
|
|
98
|
+
* `vendor/ruby/v3.3.11/file.c:7843` — `File::LOCK_UN`, the release operation
|
|
99
|
+
* `File#flock` takes (`file.c:5204`).
|
|
100
|
+
*
|
|
101
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::LOCK_UN`.
|
|
102
|
+
*/
|
|
103
|
+
static readonly LOCK_UN = 8;
|
|
104
|
+
/**
|
|
105
|
+
* `vendor/ruby/v3.3.11/file.c:7845` — `File::LOCK_NB`, which makes `File#flock`
|
|
106
|
+
* answer `false` rather than wait (`file.c:5201`).
|
|
107
|
+
*
|
|
108
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::LOCK_NB`.
|
|
109
|
+
*/
|
|
110
|
+
static readonly LOCK_NB = 4;
|
|
111
|
+
/**
|
|
112
|
+
* `vendor/ruby/v3.3.11/dir.c:3678` — a backslash is an ordinary character, not an escape.
|
|
113
|
+
*
|
|
114
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::FNM_NOESCAPE`.
|
|
115
|
+
*/
|
|
116
|
+
static readonly FNM_NOESCAPE = 1;
|
|
117
|
+
/**
|
|
118
|
+
* `vendor/ruby/v3.3.11/dir.c:3682` — `*`, `?` and a bracket stop at `/`, and `**` + `/` walks elements.
|
|
119
|
+
*
|
|
120
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::FNM_PATHNAME`.
|
|
121
|
+
*/
|
|
122
|
+
static readonly FNM_PATHNAME = 2;
|
|
123
|
+
/**
|
|
124
|
+
* `vendor/ruby/v3.3.11/dir.c:3686` — a wildcard may match a leading period.
|
|
125
|
+
*
|
|
126
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::FNM_DOTMATCH`.
|
|
127
|
+
*/
|
|
128
|
+
static readonly FNM_DOTMATCH = 4;
|
|
129
|
+
/**
|
|
130
|
+
* `vendor/ruby/v3.3.11/dir.c:3674` — case-insensitive matching.
|
|
131
|
+
*
|
|
132
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::FNM_CASEFOLD`.
|
|
133
|
+
*/
|
|
134
|
+
static readonly FNM_CASEFOLD = 8;
|
|
135
|
+
/**
|
|
136
|
+
* `vendor/ruby/v3.3.11/dir.c:222-226` — `FNM_CASEFOLD` on a case-folding filesystem
|
|
137
|
+
* and `0` otherwise, which is the arm `Entry_#descendant_directory?` selects
|
|
138
|
+
* on (`vendor/ruby/v3.3.11/lib/fileutils.rb:2453`).
|
|
139
|
+
*
|
|
140
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::FNM_SYSCASE`.
|
|
141
|
+
*/
|
|
142
|
+
static readonly FNM_SYSCASE = 0;
|
|
143
|
+
/**
|
|
144
|
+
* `vendor/ruby/v3.3.11/dir.c:3690` — `{a,b}` alternation, expanded by `ruby_brace_expand` (`dir.c:3471-3478`).
|
|
145
|
+
*
|
|
146
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File::FNM_EXTGLOB`.
|
|
147
|
+
*/
|
|
148
|
+
static readonly FNM_EXTGLOB = 16;
|
|
149
|
+
/**
|
|
150
|
+
* `vendor/ruby/v3.3.11/file.c:1806` `rb_file_exist_p`, which is `rb_stat(fname)`
|
|
151
|
+
* against a FOLLOWED symlink — so a broken symlink is `false` even though
|
|
152
|
+
* `File.symlink?` is `true`.
|
|
153
|
+
*
|
|
154
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.exist?`
|
|
155
|
+
* (`vendor/ruby/v3.3.11/file.c:1806`).
|
|
156
|
+
*/
|
|
157
|
+
static isExist(fileName: string | PathLike): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* {@link File.isExist} over the backend's async `exists`.
|
|
160
|
+
*
|
|
161
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.exist?`
|
|
162
|
+
* (`vendor/ruby/v3.3.11/file.c:1806`).
|
|
163
|
+
*/
|
|
164
|
+
static isExistAsync(fileName: string): Promise<boolean>;
|
|
165
|
+
/**
|
|
166
|
+
* `vendor/ruby/v3.3.11/file.c:2196` `rb_file_identical_p` — `false` unless both
|
|
167
|
+
* names stat successfully and report the same `st_dev` and `st_ino`
|
|
168
|
+
* (`file.c:2201-2205`). Either argument may be an open stream, which
|
|
169
|
+
* `rb_stat` (`file.c:1296`) `fstat`s instead. An adapter that reports no
|
|
170
|
+
* device identity cannot answer, so it answers `false`.
|
|
171
|
+
*
|
|
172
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.identical?`
|
|
173
|
+
* (`vendor/ruby/v3.3.11/file.c:2196`).
|
|
174
|
+
*/
|
|
175
|
+
static isIdentical(fileName1: IO | string, fileName2: IO | string): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* {@link File.isDirectory} over the backend's async `stat`: any failed stat
|
|
178
|
+
* answers `false`, as `rb_file_directory_p` does (`file.c:1622`).
|
|
179
|
+
*
|
|
180
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.directory?`
|
|
181
|
+
* (`vendor/ruby/v3.3.11/file.c:1615`).
|
|
182
|
+
*/
|
|
183
|
+
static isDirectoryAsync(fileName: string): Promise<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* `vendor/ruby/v3.3.11/file.c:1615` `rb_file_directory_p`, which answers `false`
|
|
186
|
+
* rather than raising when the stat fails (`file.c:1622`).
|
|
187
|
+
*
|
|
188
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.directory?`
|
|
189
|
+
* (`vendor/ruby/v3.3.11/file.c:1615`).
|
|
190
|
+
*/
|
|
191
|
+
static isDirectory(fileName: string): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* `vendor/ruby/v3.3.11/file.c:1966` `rb_file_executable_p`, which is
|
|
194
|
+
* `rb_eaccess(fname, X_OK) >= 0`: the backend's `File::Stat#executable?`
|
|
195
|
+
* (`file.c:2244`), and `false` where the stat fails.
|
|
196
|
+
*
|
|
197
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.executable?`
|
|
198
|
+
* (`vendor/ruby/v3.3.11/file.c:1966`).
|
|
199
|
+
*/
|
|
200
|
+
static isExecutable(fileName: string): boolean;
|
|
201
|
+
/**
|
|
202
|
+
* `vendor/ruby/v3.3.11/file.c:1723` `rb_file_symlink_p`, which `lstat`s the name and
|
|
203
|
+
* answers `false` rather than raising when the `lstat` fails
|
|
204
|
+
* (`file.c:1730`), the way its {@link File.isDirectory} neighbour does.
|
|
205
|
+
*
|
|
206
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.symlink?`
|
|
207
|
+
* (`vendor/ruby/v3.3.11/file.c:1723`).
|
|
208
|
+
*/
|
|
209
|
+
static isSymlink(fileName: string): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.file?`
|
|
212
|
+
* (`vendor/ruby/v3.3.11/file.c:2009`), over the backend's async `stat`.
|
|
213
|
+
*/
|
|
214
|
+
static isFileAsync(fileName: string): Promise<boolean>;
|
|
215
|
+
/**
|
|
216
|
+
* {@link File.isIdentical} over the backend's async `stat`, which is the
|
|
217
|
+
* form a caller on the async fs path awaits; a backend with no async `stat`
|
|
218
|
+
* is read through its sync one. A stream argument is still `fstat`ed, as
|
|
219
|
+
* `rb_stat` (`vendor/ruby/v3.3.11/file.c:1296`) does.
|
|
220
|
+
*
|
|
221
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.identical?`
|
|
222
|
+
* (`vendor/ruby/v3.3.11/file.c:2196`).
|
|
223
|
+
*/
|
|
224
|
+
static isIdenticalAsync(fileName1: IO | string, fileName2: IO | string): Promise<boolean>;
|
|
225
|
+
/**
|
|
226
|
+
* {@link File.isSymlink} over the backend's async `lstat`, `false` on a
|
|
227
|
+
* failed `lstat`; a backend with no async `lstat` is read through its sync
|
|
228
|
+
* one.
|
|
229
|
+
*
|
|
230
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.symlink?`
|
|
231
|
+
* (`vendor/ruby/v3.3.11/file.c:1670`).
|
|
232
|
+
*/
|
|
233
|
+
static isSymlinkAsync(fileName: string): Promise<boolean>;
|
|
234
|
+
/**
|
|
235
|
+
* `vendor/ruby/v3.3.11/file.c:2009` `rb_file_file_p`, `false` on a failed stat.
|
|
236
|
+
*
|
|
237
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.file?`
|
|
238
|
+
* (`vendor/ruby/v3.3.11/file.c:2009`).
|
|
239
|
+
*/
|
|
240
|
+
static isFile(fileName: string): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* {@link File.isReadable} over the backend's async `access`, `rb_eaccess(fname, R_OK)`.
|
|
243
|
+
*
|
|
244
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.readable?`
|
|
245
|
+
* (`vendor/ruby/v3.3.11/file.c:1826`).
|
|
246
|
+
*/
|
|
247
|
+
static isReadableAsync(fileName: string): Promise<boolean>;
|
|
248
|
+
/**
|
|
249
|
+
* {@link File.isExecutable} over the backend's async `access`, `rb_eaccess(fname, X_OK)`.
|
|
250
|
+
*
|
|
251
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.executable?`
|
|
252
|
+
* (`vendor/ruby/v3.3.11/file.c:1966`).
|
|
253
|
+
*/
|
|
254
|
+
static isExecutableAsync(fileName: string): Promise<boolean>;
|
|
255
|
+
/**
|
|
256
|
+
* `vendor/ruby/v3.3.11/file.c:1826` `rb_file_readable_p`, which is
|
|
257
|
+
* `rb_eaccess(fname, R_OK) >= 0` and so is `false` both for a file that is
|
|
258
|
+
* not there and for one the effective user cannot read. `R_OK` is POSIX's
|
|
259
|
+
* `4` rather than a Ruby constant. A backend with no access check has no
|
|
260
|
+
* `accessSync`, and there existence is all that can be answered.
|
|
261
|
+
*
|
|
262
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.readable?`
|
|
263
|
+
* (`vendor/ruby/v3.3.11/file.c:1826`).
|
|
264
|
+
*/
|
|
265
|
+
static isReadable(fileName: string): boolean;
|
|
266
|
+
/**
|
|
267
|
+
* `vendor/ruby/v3.3.11/file.c:1329` `rb_file_s_stat`, which RAISES `Errno::ENOENT`
|
|
268
|
+
* rather than answering `nil` when the path is not there — the predicates
|
|
269
|
+
* above are the arms that swallow it.
|
|
270
|
+
*
|
|
271
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.stat`
|
|
272
|
+
* (`vendor/ruby/v3.3.11/file.c:1329`).
|
|
273
|
+
*/
|
|
274
|
+
static stat(fileName: string): FsStatResult;
|
|
275
|
+
/**
|
|
276
|
+
* `vendor/ruby/v3.3.11/file.c:2028` `rb_file_zero_p`, which answers `false`
|
|
277
|
+
* rather than raising when the stat fails.
|
|
278
|
+
*
|
|
279
|
+
* @noRailsEquivalent PERMANENT — Ruby core `FileTest.empty?` (`vendor/ruby/v3.3.11/file.c:7368`).
|
|
280
|
+
*/
|
|
281
|
+
static isEmpty(fileName: string): boolean;
|
|
282
|
+
/**
|
|
283
|
+
* `vendor/ruby/v3.3.11/file.c:1305` `rb_file_s_size` — the byte size of the named
|
|
284
|
+
* file, which is `File.stat(file_name).size`.
|
|
285
|
+
*
|
|
286
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.size`
|
|
287
|
+
* (`vendor/ruby/v3.3.11/file.c:1305`).
|
|
288
|
+
*/
|
|
289
|
+
static size(fileName: string): number;
|
|
290
|
+
/**
|
|
291
|
+
* `vendor/ruby/v3.3.11/file.c:2047` `rb_file_size_p` — `File.size?`, `nil` both when
|
|
292
|
+
* the file is missing AND when it is empty, which is what makes it a
|
|
293
|
+
* three-state answer rather than a size.
|
|
294
|
+
*
|
|
295
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.size?`
|
|
296
|
+
* (`vendor/ruby/v3.3.11/file.c:2047`).
|
|
297
|
+
*/
|
|
298
|
+
static isSize(fileName: string): number | null;
|
|
299
|
+
/**
|
|
300
|
+
* `vendor/ruby/v3.3.11/io.c:15418`, where `rb_cFile` registers `rb_io_s_open`
|
|
301
|
+
* (`io.c:8148`): with a block the stream is closed once the block returns
|
|
302
|
+
* and the block's value is the answer. Ruby's mode string carries the
|
|
303
|
+
* binary flag node's `flags` has no letter for, so `b` is dropped from the
|
|
304
|
+
* flags and recorded on the stream instead (`rb_io_binmode`, `io.c:6311`),
|
|
305
|
+
* where {@link IO#write} reads it.
|
|
306
|
+
*
|
|
307
|
+
* `rb_io_s_open` takes the `opt` hash Ruby's `File.open(filename, mode, opt)`
|
|
308
|
+
* form passes through to `open(2)`, of which `perm:` is the mode
|
|
309
|
+
* `Tempfile#initialize` sets to `0600` (`vendor/ruby/v3.3.11/lib/tempfile.rb:158`)
|
|
310
|
+
* and `external_encoding:` the stream's external encoding
|
|
311
|
+
* (`rb_io_extract_encoding_option`, `io.c:6725,6750`).
|
|
312
|
+
* `mode` defaults to `"r"` (`rb_open_file`, `vendor/ruby/v3.3.11/io.c:8102`); a caller that
|
|
313
|
+
* skips it passes `undefined`.
|
|
314
|
+
* Ruby's block is a block and its `opt` a trailing argument; TypeScript has
|
|
315
|
+
* only the one trailing position for both, so the third parameter is either,
|
|
316
|
+
* discriminated by `typeof`, and a block that follows an `opt` is the fourth.
|
|
317
|
+
*
|
|
318
|
+
* The mode string carries that encoding too — everything after the first
|
|
319
|
+
* `:` is `parse_mode_enc`'s `"enc"`, `"enc2:enc"` or `"enc:-"`
|
|
320
|
+
* (`io.c:6667,6883-6886`), which {@link IO#setEncoding} parses.
|
|
321
|
+
*
|
|
322
|
+
* `rb_io_s_open` closes the stream through `rb_ensure` once the block has
|
|
323
|
+
* finished. A block that returns a promise has not finished until it
|
|
324
|
+
* settles, so the close waits for it — otherwise an async block would write
|
|
325
|
+
* to a closed stream.
|
|
326
|
+
*
|
|
327
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.open`
|
|
328
|
+
* (`vendor/ruby/v3.3.11/io.c:8148`).
|
|
329
|
+
*/
|
|
330
|
+
static open(fileName: string, mode?: string | FileOpenOpt, opt?: FileOpenOpt): File;
|
|
331
|
+
static open<T>(fileName: string, mode: string | FileOpenOpt | undefined, block: (file: File) => T): T;
|
|
332
|
+
static open<T>(fileName: string, mode: string | FileOpenOpt | undefined, opt: FileOpenOpt, block: (file: File) => T): T;
|
|
333
|
+
/**
|
|
334
|
+
* {@link File.open} over the backend's async open, for a caller whose block
|
|
335
|
+
* reads with {@link IO#eachAsync}. The stream closes once the block settles.
|
|
336
|
+
*
|
|
337
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.open`
|
|
338
|
+
* (`vendor/ruby/v3.3.11/io.c:8148`).
|
|
339
|
+
*/
|
|
340
|
+
static openAsync<F extends File>(this: new (fileName: number, mode?: string | FileOpenOpt, opt?: FileOpenOpt) => F, fileName: string, mode?: string | FileOpenOpt, opt?: FileOpenOpt): Promise<F>;
|
|
341
|
+
static openAsync<T>(fileName: string, mode: string | FileOpenOpt | undefined, block: (file: File) => T | Promise<T>): Promise<T>;
|
|
342
|
+
static openAsync<T>(fileName: string, mode: string | FileOpenOpt | undefined, opt: FileOpenOpt, block: (file: File) => T | Promise<T>): Promise<T>;
|
|
343
|
+
/**
|
|
344
|
+
* `vendor/ruby/v3.3.11/io.c:12200` `rb_io_s_read`, in its whole-file form: its `opt`
|
|
345
|
+
* hash reaches `open_key_args` (`io.c:12163`), which opens the stream with
|
|
346
|
+
* it — so `encoding:` is `rb_io_extract_encoding_option`'s external encoding
|
|
347
|
+
* (`io.c:6725,6750`) and the read tags its String with it (`io_enc_str`,
|
|
348
|
+
* `io.c:3123`), `ASCII-8BIT` being the one that answers the file's bytes.
|
|
349
|
+
* `open_key_args` closes the stream through `rb_ensure` (`io.c:12180`).
|
|
350
|
+
*
|
|
351
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.read` (`IO.read`,
|
|
352
|
+
* `vendor/ruby/v3.3.11/io.c:12200`).
|
|
353
|
+
*/
|
|
354
|
+
static read(name: string): string;
|
|
355
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `File.read` (`vendor/ruby/v3.3.11/io.c:12200`). */
|
|
356
|
+
static read(name: string, opt: {
|
|
357
|
+
encoding?: Encoding | string;
|
|
358
|
+
}): string | Uint8Array;
|
|
359
|
+
/**
|
|
360
|
+
* {@link File.read} over the backend's async `readFile`, as UTF-8 text.
|
|
361
|
+
*
|
|
362
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.read` (`IO.read`,
|
|
363
|
+
* `vendor/ruby/v3.3.11/io.c:12200`).
|
|
364
|
+
*/
|
|
365
|
+
static readAsync(name: string): Promise<string>;
|
|
366
|
+
/**
|
|
367
|
+
* `vendor/ruby/v3.3.11/io.c:12063` `rb_io_s_foreach` in its block form: the stream
|
|
368
|
+
* opens through `open_key_args` (`io.c:12163`), `rb_io_each_line`
|
|
369
|
+
* (`io.c:4159`) yields each line with its separator retained, and
|
|
370
|
+
* `rb_ensure` (`io.c:12180`) closes it. The file is read in chunks, never
|
|
371
|
+
* whole; the decoder streams so a character straddling two chunks survives.
|
|
372
|
+
*
|
|
373
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.foreach` (`IO.foreach`,
|
|
374
|
+
* `vendor/ruby/v3.3.11/io.c:12063`).
|
|
375
|
+
*/
|
|
376
|
+
static foreach(name: string, block: (line: string) => void): null;
|
|
377
|
+
/**
|
|
378
|
+
* `vendor/ruby/v3.3.11/io.c:12377` `rb_io_s_write`, which answers the number of
|
|
379
|
+
* BYTES written rather than the string itself.
|
|
380
|
+
*
|
|
381
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.write` (`IO.write`,
|
|
382
|
+
* `vendor/ruby/v3.3.11/io.c:12377`).
|
|
383
|
+
*/
|
|
384
|
+
static write(name: string, string: string): number;
|
|
385
|
+
/**
|
|
386
|
+
* `vendor/ruby/v3.3.11/file.c:3202` `rb_file_s_unlink`, which answers the number of
|
|
387
|
+
* files deleted and raises on the first failure.
|
|
388
|
+
*
|
|
389
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.delete`
|
|
390
|
+
* (`vendor/ruby/v3.3.11/file.c:3202`).
|
|
391
|
+
*/
|
|
392
|
+
static delete(...files: string[]): number;
|
|
393
|
+
/**
|
|
394
|
+
* {@link File.write} over the backend's async `writeFile`, falling back to its
|
|
395
|
+
* `writeFileSync`. `perm` is `IO.write`'s `perm:` option
|
|
396
|
+
* (`vendor/ruby/v3.3.11/io.c:6953`), the mode a created file is opened with,
|
|
397
|
+
* and `mode` its `mode:` open-mode string (`"wx"` is
|
|
398
|
+
* `CREAT | EXCL | WRONLY`, raising `Errno::EEXIST` on an existing file).
|
|
399
|
+
*
|
|
400
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.write` (`IO.write`,
|
|
401
|
+
* `vendor/ruby/v3.3.11/io.c:12377`).
|
|
402
|
+
*/
|
|
403
|
+
static writeAsync(name: string, string: string | Uint8Array, { perm, mode }?: {
|
|
404
|
+
perm?: number;
|
|
405
|
+
mode?: string;
|
|
406
|
+
}): Promise<number>;
|
|
407
|
+
/**
|
|
408
|
+
* {@link File.delete} over the backend's async `unlink`, falling back to its
|
|
409
|
+
* `unlinkSync`.
|
|
410
|
+
*
|
|
411
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.delete`
|
|
412
|
+
* (`vendor/ruby/v3.3.11/file.c:3202`).
|
|
413
|
+
*/
|
|
414
|
+
static deleteAsync(...files: string[]): Promise<number>;
|
|
415
|
+
/**
|
|
416
|
+
* `vendor/ruby/v3.3.11/file.c:3279` `rb_file_s_umask`, reading only. A backend
|
|
417
|
+
* with no permission bits answers 0, as `chmod` below is a no-op there.
|
|
418
|
+
*
|
|
419
|
+
* @noRailsEquivalent PERMANENT
|
|
420
|
+
*/
|
|
421
|
+
static umask(): number;
|
|
422
|
+
/**
|
|
423
|
+
* `vendor/ruby/v3.3.11/file.c:2575` `rb_file_s_chmod`, which answers the number of
|
|
424
|
+
* files whose mode was set. A backend with no permission bits has no
|
|
425
|
+
* `chmodSync`, and there the call is a no-op.
|
|
426
|
+
*
|
|
427
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.chmod`
|
|
428
|
+
* (`vendor/ruby/v3.3.11/file.c:2575`).
|
|
429
|
+
*/
|
|
430
|
+
static chmod(mode: number, ...files: string[]): number;
|
|
431
|
+
/**
|
|
432
|
+
* {@link File.chmod} over the backend's async `chmod`, falling back to its
|
|
433
|
+
* `chmodSync`; a backend with no permission bits has neither, and there the
|
|
434
|
+
* call is a no-op too.
|
|
435
|
+
*
|
|
436
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.chmod`
|
|
437
|
+
* (`vendor/ruby/v3.3.11/file.c:2575`).
|
|
438
|
+
*/
|
|
439
|
+
static chmodAsync(mode: number, ...files: string[]): Promise<number>;
|
|
440
|
+
/**
|
|
441
|
+
* `vendor/ruby/v3.3.11/file.c:3056` `rb_file_s_link`, which answers `0`
|
|
442
|
+
* (`file.c:3066`) and raises `NotImplementedError` on a platform with no
|
|
443
|
+
* `link(2)` — spelled here as a backend with no `link`.
|
|
444
|
+
*
|
|
445
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.link`
|
|
446
|
+
* (`vendor/ruby/v3.3.11/file.c:3056`).
|
|
447
|
+
*/
|
|
448
|
+
static linkAsync(oldName: string, newName: string): Promise<number>;
|
|
449
|
+
/**
|
|
450
|
+
* `vendor/ruby/v3.3.11/file.c:3086` `rb_file_s_symlink`, which answers `0`
|
|
451
|
+
* (`file.c:3096`) and raises `NotImplementedError` on a platform with no
|
|
452
|
+
* `symlink(2)` — spelled here as a backend with no `symlink`.
|
|
453
|
+
*
|
|
454
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.symlink`
|
|
455
|
+
* (`vendor/ruby/v3.3.11/file.c:3086`).
|
|
456
|
+
*/
|
|
457
|
+
static symlinkAsync(oldName: string, newName: string): Promise<number>;
|
|
458
|
+
/**
|
|
459
|
+
* `vendor/ruby/v3.3.11/file.c:3115` `rb_file_s_readlink`: the name of the file
|
|
460
|
+
* the link `path` refers to. `rb_f_notimplement` stands in on a platform with
|
|
461
|
+
* no `readlink(2)` (`file.c:3197`), spelled here as a backend with no
|
|
462
|
+
* `readlinkSync`.
|
|
463
|
+
*
|
|
464
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.readlink`
|
|
465
|
+
* (`vendor/ruby/v3.3.11/file.c:3115`).
|
|
466
|
+
*/
|
|
467
|
+
static readlink(path: string): string;
|
|
468
|
+
/**
|
|
469
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.chown`
|
|
470
|
+
* (`vendor/ruby/v3.3.11/file.c:2706`), over the backend's async `chown`.
|
|
471
|
+
*/
|
|
472
|
+
static chownAsync(owner: number | null, group: number | null, path: string): Promise<void>;
|
|
473
|
+
/**
|
|
474
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.utime`
|
|
475
|
+
* (`vendor/ruby/v3.3.11/file.c:2983`), over the backend's async `utimes`.
|
|
476
|
+
*/
|
|
477
|
+
static utimeAsync(atime: Date, mtime: Date, path: string): Promise<void>;
|
|
478
|
+
/**
|
|
479
|
+
* `vendor/ruby/v3.3.11/file.c:2706` `rb_file_s_chown`, which answers the number of
|
|
480
|
+
* files whose owner was set. A `nil` owner or group is ignored
|
|
481
|
+
* (`file.c:2698`) — `File.chown(nil, 100, "testfile")` — which `to_uid` /
|
|
482
|
+
* `to_gid` (`file.c:2661,2670`) carry through as `-1`. A backend with no
|
|
483
|
+
* ownership has no `chownSync`, and there the call is a no-op.
|
|
484
|
+
*
|
|
485
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.chown`
|
|
486
|
+
* (`vendor/ruby/v3.3.11/file.c:2706`).
|
|
487
|
+
*/
|
|
488
|
+
static chown(owner: number | null, group: number | null, ...files: string[]): number;
|
|
489
|
+
/**
|
|
490
|
+
* `vendor/ruby/v3.3.11/file.c:3231` `rb_file_s_rename`, which answers `0` and
|
|
491
|
+
* replaces `to` when it already exists.
|
|
492
|
+
*
|
|
493
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.rename`
|
|
494
|
+
* (`vendor/ruby/v3.3.11/file.c:3231`).
|
|
495
|
+
*/
|
|
496
|
+
static rename(from: string, to: string): number;
|
|
497
|
+
/**
|
|
498
|
+
* `vendor/ruby/v3.3.11/file.c:2427` `rb_file_s_mtime`, the modification Time of a
|
|
499
|
+
* FOLLOWED symlink — it raises `ENOENT` rather than answering `nil` when the
|
|
500
|
+
* path does not exist.
|
|
501
|
+
*
|
|
502
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.mtime`
|
|
503
|
+
* (`vendor/ruby/v3.3.11/file.c:2427`).
|
|
504
|
+
*/
|
|
505
|
+
static mtime(fileName: string): Date;
|
|
506
|
+
/**
|
|
507
|
+
* {@link File.mtime} over the backend's async `stat`.
|
|
508
|
+
*
|
|
509
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.mtime`
|
|
510
|
+
* (`vendor/ruby/v3.3.11/file.c:2427`).
|
|
511
|
+
*/
|
|
512
|
+
static mtimeAsync(fileName: string): Promise<Date>;
|
|
513
|
+
/**
|
|
514
|
+
* `vendor/ruby/v3.3.11/file.c:4559` `rb_file_s_realpath`, which resolves every
|
|
515
|
+
* symlink and raises `ENOENT` when the path does not exist. A backend with
|
|
516
|
+
* no symlink support has no `realpathSync`, and there the path resolves
|
|
517
|
+
* lexically.
|
|
518
|
+
*
|
|
519
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.realpath`
|
|
520
|
+
* (`vendor/ruby/v3.3.11/file.c:4559`).
|
|
521
|
+
*/
|
|
522
|
+
static realpath(pathname: string): string;
|
|
523
|
+
/**
|
|
524
|
+
* {@link File.realpath} over the backend's async `realpath`, resolving
|
|
525
|
+
* lexically where the backend has none.
|
|
526
|
+
*
|
|
527
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.realpath`
|
|
528
|
+
* (`vendor/ruby/v3.3.11/file.c:4559`).
|
|
529
|
+
*/
|
|
530
|
+
static realpathAsync(pathname: string): Promise<string>;
|
|
531
|
+
/**
|
|
532
|
+
* `vendor/ruby/v3.3.11/file.c:4580` `rb_file_s_realdirpath`, {@link File.realpath}
|
|
533
|
+
* with the last component allowed to be missing, following a broken symlink
|
|
534
|
+
* to its target.
|
|
535
|
+
*
|
|
536
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.realdirpath`
|
|
537
|
+
* (`vendor/ruby/v3.3.11/file.c:4580`).
|
|
538
|
+
*/
|
|
539
|
+
static realdirpathAsync(pathname: string): Promise<string>;
|
|
540
|
+
/**
|
|
541
|
+
* `vendor/ruby/v3.3.11/file.c:5013` `rb_file_join`, which is a STRING join and not
|
|
542
|
+
* a path normalization: `File.join("a", "..", "b")` is `"a/../b"`, where
|
|
543
|
+
* node's `path.join` answers `"b"`. A separator at the boundary is squeezed
|
|
544
|
+
* to one (`file.c:5061-5067`) — `File.join("a//", "/b")` is `"a/b"` — and an
|
|
545
|
+
* empty component keeps its separator, so `File.join("a", "")` is `"a/"`.
|
|
546
|
+
* Both boundary arms test with `isdirsep`, so a `File::ALT_SEPARATOR` at the
|
|
547
|
+
* boundary is a separator too: `File.join("a\\", "b")` is `"a\\b"` on
|
|
548
|
+
* Windows and `"a\\/b"` on POSIX. An Array component is joined first and
|
|
549
|
+
* spliced in (`file.c:5048-5054`), so an empty one contributes `""`:
|
|
550
|
+
* `File.join("a", [], "b")` is `"a/b"`.
|
|
551
|
+
*
|
|
552
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.join`
|
|
553
|
+
* (`vendor/ruby/v3.3.11/file.c:5013`).
|
|
554
|
+
*/
|
|
555
|
+
static join(...args: FileJoinArg[]): string;
|
|
556
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `File.split` (`rb_file_s_split`, `vendor/ruby/v3.3.11/file.c:4999-5004`). */
|
|
557
|
+
static split(path: string): [string, string];
|
|
558
|
+
/**
|
|
559
|
+
* `vendor/ruby/v3.3.11/file.c:4770` `rb_file_s_dirname`.
|
|
560
|
+
*
|
|
561
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.dirname`
|
|
562
|
+
* (`vendor/ruby/v3.3.11/file.c:4770`).
|
|
563
|
+
*/
|
|
564
|
+
static dirname(fileName: string): string;
|
|
565
|
+
/**
|
|
566
|
+
* `vendor/ruby/v3.3.11/file.c:4705` `rb_file_s_basename`. The optional `suffix` is
|
|
567
|
+
* stripped, and the literal `".*"` strips whatever extension is there
|
|
568
|
+
* (`file.c:4664-4680`). A path of separators only answers `"/"`
|
|
569
|
+
* (`vendor/ruby/v3.3.11/file.c:4625` `ruby_enc_find_basename`).
|
|
570
|
+
*
|
|
571
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.basename`
|
|
572
|
+
* (`vendor/ruby/v3.3.11/file.c:4705`).
|
|
573
|
+
*/
|
|
574
|
+
static basename(fileName: string | PathLike, suffix?: string): string;
|
|
575
|
+
/**
|
|
576
|
+
* `vendor/ruby/v3.3.11/file.c:4954` `rb_file_s_extname`: a leading dot is not an
|
|
577
|
+
* extension (`".bashrc"` is `""`) and a trailing dot is (`"b."` is `"."`).
|
|
578
|
+
*
|
|
579
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.extname`
|
|
580
|
+
* (`vendor/ruby/v3.3.11/file.c:4954`).
|
|
581
|
+
*/
|
|
582
|
+
static extname(fileName: string): string;
|
|
583
|
+
/**
|
|
584
|
+
* `vendor/ruby/v3.3.11/dir.c:3457` `file_s_fnmatch` — `true` when `path` matches the
|
|
585
|
+
* glob `pattern`. Under `FNM_EXTGLOB` the pattern is brace-expanded first and
|
|
586
|
+
* the first alternative that matches wins (`dir.c:3471-3478`).
|
|
587
|
+
*
|
|
588
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.fnmatch`
|
|
589
|
+
* (`vendor/ruby/v3.3.11/dir.c:3457`).
|
|
590
|
+
*/
|
|
591
|
+
static fnmatch(pattern: string, path: string, flags?: number): boolean;
|
|
592
|
+
/**
|
|
593
|
+
* `vendor/ruby/v3.3.11/file.c:4126` `rb_file_s_expand_path`, which resolves
|
|
594
|
+
* `fileName` against `dirString` — the working directory when it is omitted.
|
|
595
|
+
*
|
|
596
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.expand_path`
|
|
597
|
+
* (`vendor/ruby/v3.3.11/file.c:4126`).
|
|
598
|
+
*/
|
|
599
|
+
static expandPath(fileName: string | {
|
|
600
|
+
toPath(): string;
|
|
601
|
+
}, dirString?: string | {
|
|
602
|
+
toPath(): string;
|
|
603
|
+
} | null): string;
|
|
604
|
+
/**
|
|
605
|
+
* `vendor/ruby/v3.3.11/file.c:4210` `rb_file_s_absolute_path_p`.
|
|
606
|
+
*
|
|
607
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File.absolute_path?`
|
|
608
|
+
* (`vendor/ruby/v3.3.11/file.c:4210`).
|
|
609
|
+
*/
|
|
610
|
+
static isAbsolutePath(fileName: string | {
|
|
611
|
+
toPath(): string;
|
|
612
|
+
}): boolean;
|
|
613
|
+
/**
|
|
614
|
+
* `vendor/ruby/v3.3.11/file.c:5301` `rb_file_flock`, which answers `0` once the lock
|
|
615
|
+
* is held. A backend with no advisory locking — node's `fs` exposes no
|
|
616
|
+
* `flock(2)` — has no `flockSync`, and there the stream is left unlocked,
|
|
617
|
+
* which is what an unlockable file already behaves like.
|
|
618
|
+
*
|
|
619
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File#flock`
|
|
620
|
+
* (`vendor/ruby/v3.3.11/file.c:5301`).
|
|
621
|
+
*/
|
|
622
|
+
flock(operation: number): number | false;
|
|
623
|
+
/**
|
|
624
|
+
* `vendor/ruby/v3.3.11/file.c:1330` `rb_file_size` — `fstat(2)` of the open
|
|
625
|
+
* descriptor, which is why it answers the bytes already written rather than
|
|
626
|
+
* what a stale `File.stat` of the path would say.
|
|
627
|
+
*
|
|
628
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File#size`
|
|
629
|
+
* (`vendor/ruby/v3.3.11/file.c:1330`).
|
|
630
|
+
*/
|
|
631
|
+
size(): number;
|
|
632
|
+
/**
|
|
633
|
+
* `vendor/ruby/v3.3.11/file.c:2599` `rb_file_chmod`, which answers `0`. MRI
|
|
634
|
+
* calls `fchmod(2)` on the descriptor; the `FsAdapter` contract has no
|
|
635
|
+
* `fchmodSync`, so the open file's path takes the mode instead.
|
|
636
|
+
*
|
|
637
|
+
* @noRailsEquivalent PERMANENT — Ruby core `File#chmod`
|
|
638
|
+
* (`vendor/ruby/v3.3.11/file.c:2599`).
|
|
639
|
+
*/
|
|
640
|
+
chmod(mode: number): number;
|
|
641
|
+
}
|
|
642
|
+
export {};
|
|
643
|
+
//# sourceMappingURL=file.d.ts.map
|