@shd101wyy/yo 0.1.12 → 0.1.14

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 (164) hide show
  1. package/README.md +10 -1
  2. package/out/cjs/index.cjs +578 -572
  3. package/out/cjs/yo-cli.cjs +1447 -529
  4. package/out/esm/index.mjs +434 -428
  5. package/out/types/src/build-runner.d.ts +1 -1
  6. package/out/types/src/doc/builder.d.ts +21 -0
  7. package/out/types/src/doc/builder.test.d.ts +1 -0
  8. package/out/types/src/doc/extractor.d.ts +27 -0
  9. package/out/types/src/doc/extractor.test.d.ts +1 -0
  10. package/out/types/src/doc/model.d.ts +87 -0
  11. package/out/types/src/doc/render-html.d.ts +27 -0
  12. package/out/types/src/doc/render-html.test.d.ts +1 -0
  13. package/out/types/src/doc/render-json.d.ts +7 -0
  14. package/out/types/src/doc/render-json.test.d.ts +1 -0
  15. package/out/types/src/doc/render-markdown.d.ts +13 -0
  16. package/out/types/src/doc/render-markdown.test.d.ts +1 -0
  17. package/out/types/src/doc/sections.d.ts +7 -0
  18. package/out/types/src/doc/sections.test.d.ts +1 -0
  19. package/out/types/src/doc-command.d.ts +10 -0
  20. package/out/types/src/env.d.ts +1 -0
  21. package/out/types/src/evaluator/builtins/build.d.ts +17 -0
  22. package/out/types/src/evaluator/context.d.ts +1 -0
  23. package/out/types/src/expr.d.ts +2 -1
  24. package/out/types/src/token.d.ts +4 -0
  25. package/out/types/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +2 -1
  27. package/scripts/build-site.ts +498 -0
  28. package/std/alg/hash.yo +12 -24
  29. package/std/allocator.yo +21 -29
  30. package/std/async.yo +4 -2
  31. package/std/build.yo +192 -42
  32. package/std/cli/arg_parser.yo +37 -1
  33. package/std/collections/array_list.yo +8 -20
  34. package/std/collections/btree_map.yo +15 -20
  35. package/std/collections/deque.yo +13 -15
  36. package/std/collections/hash_map.yo +15 -54
  37. package/std/collections/hash_set.yo +14 -50
  38. package/std/collections/linked_list.yo +6 -23
  39. package/std/collections/priority_queue.yo +15 -17
  40. package/std/crypto/md5.yo +10 -9
  41. package/std/crypto/random.yo +14 -12
  42. package/std/crypto/sha256.yo +9 -8
  43. package/std/encoding/base64.yo +16 -15
  44. package/std/encoding/hex.yo +17 -10
  45. package/std/encoding/html.yo +17 -11
  46. package/std/encoding/html_char_utils.yo +14 -11
  47. package/std/encoding/html_entities.yo +7 -8
  48. package/std/encoding/json.yo +39 -19
  49. package/std/encoding/punycode.yo +24 -18
  50. package/std/encoding/toml.yo +26 -9
  51. package/std/encoding/utf16.yo +19 -9
  52. package/std/error.yo +10 -23
  53. package/std/fmt/display.yo +15 -17
  54. package/std/fmt/index.yo +6 -27
  55. package/std/fmt/to_string.yo +4 -10
  56. package/std/fmt/writer.yo +33 -34
  57. package/std/fs/dir.yo +40 -30
  58. package/std/fs/file.yo +80 -75
  59. package/std/fs/metadata.yo +25 -25
  60. package/std/fs/temp.yo +21 -27
  61. package/std/fs/types.yo +20 -23
  62. package/std/fs/walker.yo +26 -31
  63. package/std/gc.yo +5 -0
  64. package/std/glob/index.yo +3 -0
  65. package/std/http/client.yo +31 -11
  66. package/std/http/http.yo +20 -0
  67. package/std/http/index.yo +1 -0
  68. package/std/io/reader.yo +4 -8
  69. package/std/io/writer.yo +4 -7
  70. package/std/libc/assert.yo +2 -2
  71. package/std/libc/ctype.yo +1 -2
  72. package/std/libc/dirent.yo +1 -2
  73. package/std/libc/errno.yo +1 -2
  74. package/std/libc/fcntl.yo +2 -2
  75. package/std/libc/float.yo +1 -2
  76. package/std/libc/limits.yo +1 -2
  77. package/std/libc/math.yo +2 -0
  78. package/std/libc/signal.yo +1 -2
  79. package/std/libc/stdatomic.yo +1 -2
  80. package/std/libc/stdint.yo +4 -3
  81. package/std/libc/stdio.yo +2 -0
  82. package/std/libc/stdlib.yo +2 -0
  83. package/std/libc/string.yo +2 -0
  84. package/std/libc/sys/stat.yo +1 -2
  85. package/std/libc/time.yo +2 -2
  86. package/std/libc/unistd.yo +2 -0
  87. package/std/libc/wctype.yo +1 -2
  88. package/std/libc/windows.yo +2 -2
  89. package/std/log/index.yo +11 -26
  90. package/std/net/addr.yo +18 -11
  91. package/std/net/dns.yo +3 -2
  92. package/std/net/errors.yo +16 -2
  93. package/std/net/tcp.yo +25 -22
  94. package/std/net/udp.yo +14 -12
  95. package/std/os/env.yo +23 -18
  96. package/std/os/signal.yo +31 -19
  97. package/std/path.yo +23 -74
  98. package/std/prelude.yo +284 -113
  99. package/std/process.yo +23 -37
  100. package/std/regex/compiler.yo +3 -5
  101. package/std/regex/flags.yo +11 -11
  102. package/std/regex/index.yo +2 -13
  103. package/std/regex/match.yo +3 -5
  104. package/std/regex/node.yo +6 -6
  105. package/std/regex/parser.yo +2 -4
  106. package/std/regex/unicode.yo +5 -5
  107. package/std/regex/vm.yo +5 -5
  108. package/std/string/index.yo +2 -1
  109. package/std/string/rune.yo +25 -1
  110. package/std/string/string.yo +31 -19
  111. package/std/string/unicode.yo +14 -15
  112. package/std/sync/channel.yo +18 -28
  113. package/std/sync/cond.yo +4 -0
  114. package/std/sync/mutex.yo +4 -1
  115. package/std/sync/once.yo +17 -19
  116. package/std/sync/rwlock.yo +19 -22
  117. package/std/sync/waitgroup.yo +21 -23
  118. package/std/sys/advise.yo +4 -4
  119. package/std/sys/bufio/buf_reader.yo +19 -16
  120. package/std/sys/bufio/buf_writer.yo +14 -11
  121. package/std/sys/clock.yo +4 -4
  122. package/std/sys/constants.yo +5 -5
  123. package/std/sys/copy.yo +9 -8
  124. package/std/sys/dir.yo +9 -8
  125. package/std/sys/dns.yo +8 -8
  126. package/std/sys/errors.yo +35 -6
  127. package/std/sys/events.yo +3 -3
  128. package/std/sys/externs.yo +3 -3
  129. package/std/sys/fallocate.yo +4 -4
  130. package/std/sys/fcntl.yo +8 -6
  131. package/std/sys/file.yo +7 -8
  132. package/std/sys/future.yo +1 -3
  133. package/std/sys/iov.yo +4 -4
  134. package/std/sys/lock.yo +7 -7
  135. package/std/sys/mmap.yo +7 -8
  136. package/std/sys/path.yo +4 -7
  137. package/std/sys/perm.yo +8 -8
  138. package/std/sys/pipe.yo +9 -8
  139. package/std/sys/process.yo +8 -8
  140. package/std/sys/seek.yo +4 -4
  141. package/std/sys/signal.yo +4 -4
  142. package/std/sys/signals.yo +4 -4
  143. package/std/sys/socket.yo +4 -4
  144. package/std/sys/socketpair.yo +4 -4
  145. package/std/sys/sockinfo.yo +4 -4
  146. package/std/sys/statfs.yo +8 -8
  147. package/std/sys/statx.yo +4 -4
  148. package/std/sys/sysinfo.yo +4 -4
  149. package/std/sys/tcp.yo +8 -8
  150. package/std/sys/temp.yo +9 -8
  151. package/std/sys/time.yo +8 -8
  152. package/std/sys/timer.yo +7 -8
  153. package/std/sys/tty.yo +13 -10
  154. package/std/sys/udp.yo +8 -8
  155. package/std/sys/umask.yo +4 -4
  156. package/std/sys/unix.yo +5 -5
  157. package/std/testing/bench.yo +21 -10
  158. package/std/thread.yo +18 -9
  159. package/std/time/datetime.yo +12 -14
  160. package/std/time/duration.yo +12 -14
  161. package/std/time/instant.yo +13 -16
  162. package/std/time/sleep.yo +9 -8
  163. package/std/url/index.yo +3 -19
  164. package/std/worker.yo +10 -18
package/std/fmt/writer.yo CHANGED
@@ -1,45 +1,44 @@
1
- // std/fmt/writer.yo - String Writer
2
- //
3
- // A composable, chainable string builder backed by ArrayList(u8).
4
- // Useful for constructing formatted strings without intermediate allocations.
5
- //
6
- // Example:
7
- // { Writer, Alignment } :: import "std/fmt/writer";
8
- //
9
- // w := Writer.new()
10
- // .write_str("hello ")
11
- // .write_str("world")
12
- // .write_byte(u8(33));
13
- // s := w.to_string(); // "hello world!"
1
+ //! Chainable string builder for composing formatted output.
2
+ //!
3
+ //! # Example
4
+ //!
5
+ //! ```rust
6
+ //! { Writer, Alignment } :: import "std/fmt/writer";
7
+ //!
8
+ //! w := Writer.new()
9
+ //! .write_str("hello ")
10
+ //! .write_str("world")
11
+ //! .write_byte(u8(33));
12
+ //! s := w.to_string(); // "hello world!"
13
+ //! ```
14
14
 
15
15
  { String } :: import "../string";
16
16
  { ArrayList } :: import "../collections/array_list";
17
17
  { rune } :: import "../string/rune";
18
18
  { snprintf } :: import "../libc/stdio";
19
19
 
20
+ /// Text alignment for padded output.
20
21
  Alignment :: enum(Left, Right, Center);
21
22
  export Alignment;
22
23
 
23
- // ============================================================================
24
- // Writer - chainable string builder
25
- // ============================================================================
26
-
24
+ /// Chainable string builder backed by `ArrayList(u8)`.
25
+ /// Useful for constructing formatted strings without intermediate allocations.
27
26
  Writer :: object(
28
27
  buf : ArrayList(u8)
29
28
  );
30
29
 
31
30
  impl(Writer,
32
- // Create a new empty Writer.
31
+ /// Create a new empty Writer.
33
32
  new : (fn() -> Self)(
34
33
  Self(buf: ArrayList(u8).new())
35
34
  ),
36
35
 
37
- // Create a Writer pre-allocated with the given byte capacity.
36
+ /// Create a Writer pre-allocated with the given byte capacity.
38
37
  with_capacity : (fn(cap: usize) -> Self)(
39
38
  Self(buf: ArrayList(u8).with_capacity(cap))
40
39
  ),
41
40
 
42
- // Append a str literal (byte slice) to the Writer.
41
+ /// Append a `str` literal (byte slice) to the Writer.
43
42
  write_str : (fn(self: Self, s: str) -> Self)({
44
43
  i := usize(0);
45
44
  while (i < s.len()),
@@ -50,7 +49,7 @@ impl(Writer,
50
49
  self
51
50
  }),
52
51
 
53
- // Append a String (owned UTF-8) to the Writer.
52
+ /// Append a String (owned UTF-8) to the Writer.
54
53
  write_string : (fn(self: Self, s: String) -> Self)({
55
54
  bytes := s.as_bytes();
56
55
  i := usize(0);
@@ -62,13 +61,13 @@ impl(Writer,
62
61
  self
63
62
  }),
64
63
 
65
- // Append a single byte to the Writer.
64
+ /// Append a single byte to the Writer.
66
65
  write_byte : (fn(self: Self, b: u8) -> Self)({
67
66
  self.buf.push(b);
68
67
  self
69
68
  }),
70
69
 
71
- // Append an ArrayList(u8) of bytes to the Writer.
70
+ /// Append an ArrayList(u8) of bytes to the Writer.
72
71
  write_bytes : (fn(self: Self, data: ArrayList(u8)) -> Self)({
73
72
  i := usize(0);
74
73
  while (i < data.len()),
@@ -79,7 +78,7 @@ impl(Writer,
79
78
  self
80
79
  }),
81
80
 
82
- // Append a Unicode code point encoded as UTF-8.
81
+ /// Append a Unicode code point encoded as UTF-8.
83
82
  write_rune : (fn(self: Self, r: rune) -> Self)({
84
83
  v := u32(r.char);
85
84
  cond(
@@ -105,7 +104,7 @@ impl(Writer,
105
104
  self
106
105
  }),
107
106
 
108
- // Append a signed 64-bit integer in decimal.
107
+ /// Append a signed 64-bit integer in decimal.
109
108
  write_i64 : (fn(self: Self, n: i64) -> Self)({
110
109
  buf := Array(u8, usize(24)).fill(u8(0));
111
110
  buf_ptr := &(buf(usize(0)));
@@ -114,7 +113,7 @@ impl(Writer,
114
113
  self.write_string(s)
115
114
  }),
116
115
 
117
- // Append an unsigned 64-bit integer in decimal.
116
+ /// Append an unsigned 64-bit integer in decimal.
118
117
  write_u64 : (fn(self: Self, n: u64) -> Self)({
119
118
  buf := Array(u8, usize(24)).fill(u8(0));
120
119
  buf_ptr := &(buf(usize(0)));
@@ -123,7 +122,7 @@ impl(Writer,
123
122
  self.write_string(s)
124
123
  }),
125
124
 
126
- // Append a 64-bit float with the given number of decimal places.
125
+ /// Append a 64-bit float with the given number of decimal places.
127
126
  write_f64 : (fn(self: Self, n: f64, precision: i32) -> Self)({
128
127
  buf := Array(u8, usize(64)).fill(u8(0));
129
128
  buf_ptr := &(buf(usize(0)));
@@ -132,7 +131,7 @@ impl(Writer,
132
131
  self.write_string(s)
133
132
  }),
134
133
 
135
- // Append a bool as "true" or "false".
134
+ /// Append a bool as "true" or "false".
136
135
  write_bool : (fn(self: Self, b: bool) -> Self)(
137
136
  cond(
138
137
  b => self.write_str("true"),
@@ -140,7 +139,7 @@ impl(Writer,
140
139
  )
141
140
  ),
142
141
 
143
- // Append an unsigned 64-bit integer in lowercase hexadecimal.
142
+ /// Append an unsigned 64-bit integer in lowercase hexadecimal.
144
143
  write_hex : (fn(self: Self, n: u64) -> Self)({
145
144
  buf := Array(u8, usize(20)).fill(u8(0));
146
145
  buf_ptr := &(buf(usize(0)));
@@ -149,7 +148,7 @@ impl(Writer,
149
148
  self.write_string(s)
150
149
  }),
151
150
 
152
- // Append an unsigned 64-bit integer in octal.
151
+ /// Append an unsigned 64-bit integer in octal.
153
152
  write_octal : (fn(self: Self, n: u64) -> Self)({
154
153
  buf := Array(u8, usize(24)).fill(u8(0));
155
154
  buf_ptr := &(buf(usize(0)));
@@ -158,7 +157,7 @@ impl(Writer,
158
157
  self.write_string(s)
159
158
  }),
160
159
 
161
- // Append an unsigned 64-bit integer in binary (no stdlib support — manual).
160
+ /// Append an unsigned 64-bit integer in binary (no stdlib support — manual).
162
161
  write_binary : (fn(self: Self, n: u64) -> Self)({
163
162
  cond(
164
163
  (n == u64(0)) => {
@@ -186,7 +185,7 @@ impl(Writer,
186
185
  self
187
186
  }),
188
187
 
189
- // Append a str padded to width using the given pad rune and alignment.
188
+ /// Append a str padded to width using the given pad rune and alignment.
190
189
  write_padded : (fn(self: Self, s: str, width: usize, pad: rune, align: Alignment) -> Self)({
191
190
  len := s.len();
192
191
  cond(
@@ -227,12 +226,12 @@ impl(Writer,
227
226
  )
228
227
  }),
229
228
 
230
- // Consume the Writer and return an owned String.
229
+ /// Consume the Writer and return an owned String.
231
230
  to_string : (fn(self: Self) -> String)(
232
231
  String.from_bytes(self.buf)
233
232
  ),
234
233
 
235
- // Return the current byte length of the buffer.
234
+ /// Return the current byte length of the buffer.
236
235
  len : (fn(self: Self) -> usize)(
237
236
  self.buf.len()
238
237
  )
package/std/fs/dir.yo CHANGED
@@ -1,22 +1,25 @@
1
- // std/fs/dir.yo - High-level directory operations
2
- //
3
- // Wraps low-level std/sys/dir with typed APIs using Exception effect.
4
- //
5
- // Example:
6
- // { create_dir, remove_dir, read_dir } :: import "std/fs/dir";
7
- // { Path } :: import "std/path";
8
- //
9
- // main :: (fn(using(io : IO)) -> unit)({
10
- // given(exn) : Exception = {
11
- // throw : (fn(forall(T : Type), error: AnyError) -> T)(
12
- // { println(error.to_string()); exit(i32(1)); }
13
- // )
14
- // };
15
- //
16
- // io.await(create_dir(Path.new(`/tmp/yo_test`)));
17
- // entries := io.await(read_dir(Path.new(`/tmp/yo_test`)));
18
- // io.await(remove_dir(Path.new(`/tmp/yo_test`)));
19
- // });
1
+ //! Async directory operations create, remove, read, link, rename.
2
+ //!
3
+ //! Wraps low-level `std/sys/dir` with typed APIs using the `Exception` effect.
4
+ //!
5
+ //! # Example
6
+ //!
7
+ //! ```rust
8
+ //! { create_dir, remove_dir, read_dir } :: import "std/fs/dir";
9
+ //! { Path } :: import "std/path";
10
+ //!
11
+ //! main :: (fn(using(io : IO)) -> unit)({
12
+ //! given(exn) : Exception = {
13
+ //! throw : (fn(forall(T : Type), error: AnyError) -> T)(
14
+ //! { println(error.to_string()); exit(i32(1)); }
15
+ //! )
16
+ //! };
17
+ //!
18
+ //! io.await(create_dir(Path.new(`/tmp/yo_test`)));
19
+ //! entries := io.await(read_dir(Path.new(`/tmp/yo_test`)));
20
+ //! io.await(remove_dir(Path.new(`/tmp/yo_test`)));
21
+ //! });
22
+ //! ```
20
23
 
21
24
  { GlobalAllocator } :: import "../allocator";
22
25
  { malloc, free } :: GlobalAllocator;
@@ -39,10 +42,15 @@ IO_file :: import "../sys/file";
39
42
  // FileType enum
40
43
  // ============================================================================
41
44
 
45
+ /// The type of a file system entry.
42
46
  FileType :: enum(
47
+ /// A regular file.
43
48
  File,
49
+ /// A directory.
44
50
  Directory,
51
+ /// A symbolic link.
45
52
  Symlink,
53
+ /// An unknown or unsupported file type.
46
54
  Other
47
55
  );
48
56
 
@@ -52,6 +60,7 @@ export FileType;
52
60
  // DirEntry
53
61
  // ============================================================================
54
62
 
63
+ /// A directory entry containing the entry name, file type, and inode number.
55
64
  DirEntry :: struct(
56
65
  name : String,
57
66
  file_type : FileType,
@@ -64,7 +73,7 @@ export DirEntry;
64
73
  // Directory operations
65
74
  // ============================================================================
66
75
 
67
- // Create a directory at the given path.
76
+ /// Create a directory at the given path.
68
77
  create_dir :: (fn(path: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
69
78
  io.async((using(io, exn)) => {
70
79
  cstr_bytes := path.to_string().to_cstr();
@@ -77,13 +86,13 @@ create_dir :: (fn(path: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception
77
86
  })
78
87
  );
79
88
 
80
- // Create a directory (str version).
89
+ /// Create a directory (`str` path variant).
81
90
  create_dir_str :: (fn(path: str, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
82
91
  create_dir(Path.new(String.from(path)))
83
92
  );
84
93
 
85
- // Create a directory and all parent directories.
86
- // Does not error if the directory already exists.
94
+ /// Create a directory and all missing parent directories.
95
+ /// Does not error if the directory already exists.
87
96
  create_dir_all :: (fn(path: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
88
97
  io.async((using(io, exn)) => {
89
98
  path_s := path.to_string();
@@ -160,12 +169,12 @@ create_dir_all :: (fn(path: Path, using(io : IO)) -> Impl(Future(unit, IO, Excep
160
169
  })
161
170
  );
162
171
 
163
- // Create a directory and all parents (str version).
172
+ /// Create a directory and all missing parents (`str` path variant).
164
173
  create_dir_all_str :: (fn(path: str, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
165
174
  create_dir_all(Path.new(String.from(path)))
166
175
  );
167
176
 
168
- // Remove an empty directory.
177
+ /// Remove an empty directory. Throws if the directory is not empty.
169
178
  remove_dir :: (fn(path: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
170
179
  io.async((using(io, exn)) => {
171
180
  cstr_bytes := path.to_string().to_cstr();
@@ -182,7 +191,7 @@ remove_dir_str :: (fn(path: str, using(io : IO)) -> Impl(Future(unit, IO, Except
182
191
  remove_dir(Path.new(String.from(path)))
183
192
  );
184
193
 
185
- // Remove a file.
194
+ /// Remove a file at the given path.
186
195
  remove_file :: (fn(path: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
187
196
  io.async((using(io, exn)) => {
188
197
  cstr_bytes := path.to_string().to_cstr();
@@ -199,7 +208,7 @@ remove_file_str :: (fn(path: str, using(io : IO)) -> Impl(Future(unit, IO, Excep
199
208
  remove_file(Path.new(String.from(path)))
200
209
  ;
201
210
 
202
- // Rename/move a file or directory.
211
+ /// Rename or move a file or directory from `from` to `to`.
203
212
  rename :: (fn(from: Path, to: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
204
213
  io.async((using(io, exn)) => {
205
214
  from_cstr_bytes := from.to_string().to_cstr();
@@ -218,7 +227,7 @@ rename_str :: (fn(from: str, to: str, using(io : IO)) -> Impl(Future(unit, IO, E
218
227
  rename(Path.new(String.from(from)), Path.new(String.from(to)))
219
228
  ;
220
229
 
221
- // Create a hard link from src to dst.
230
+ /// Create a hard link from `src` to `dst`.
222
231
  hard_link :: (fn(src: Path, dst: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
223
232
  io.async((using(io, exn)) => {
224
233
  src_cstr_bytes := src.to_string().to_cstr();
@@ -237,7 +246,7 @@ hard_link_str :: (fn(src: str, dst: str, using(io : IO)) -> Impl(Future(unit, IO
237
246
  hard_link(Path.new(String.from(src)), Path.new(String.from(dst)))
238
247
  ;
239
248
 
240
- // Create a symbolic link at dst pointing to src.
249
+ /// Create a symbolic link at `dst` pointing to `src`.
241
250
  symlink :: (fn(src: Path, dst: Path, using(io : IO)) -> Impl(Future(unit, IO, Exception)))(
242
251
  io.async((using(io, exn)) => {
243
252
  src_cstr_bytes := src.to_string().to_cstr();
@@ -260,7 +269,8 @@ symlink_str :: (fn(src: str, dst: str, using(io : IO)) -> Impl(Future(unit, IO,
260
269
  // Directory listing
261
270
  // ============================================================================
262
271
 
263
- // Read directory entries from a path.
272
+ /// Read all entries from a directory, returning an `ArrayList(DirEntry)`.
273
+ /// Skips the `.` and `..` entries.
264
274
  read_dir :: (fn(path: Path, using(io : IO)) -> Impl(Future(ArrayList(DirEntry), IO, Exception)))(
265
275
  io.async((using(io, exn)) => {
266
276
  cstr_bytes := path.to_string().to_cstr();