diff options
author | 2023-08-30 18:30:06 -0700 | |
---|---|---|
committer | 2023-08-30 18:30:06 -0700 | |
commit | 0a5d2a8195fbbaab7ff1f40ad54ba94726bcc104 (patch) | |
tree | 218b52f72b1170c8595800dcda34adc312adf08b /src/string_types.zig | |
parent | 89f24e66fff37eab4b984847b73be0b69dbcd0a8 (diff) | |
download | bun-0a5d2a8195fbbaab7ff1f40ad54ba94726bcc104.tar.gz bun-0a5d2a8195fbbaab7ff1f40ad54ba94726bcc104.tar.zst bun-0a5d2a8195fbbaab7ff1f40ad54ba94726bcc104.zip |
feat(node:fs): add `cp`/`cpSync`/`promises.cp` + async `copyFile` (#4340)
* half working disaster code
* this
* async copyFile
* .
* its failing symlink tests
* asdfg
* asdf
* hmm
* okay i think ti works
* small edits
* fix test on linux
* i hate atomics / atomics hate me back <3
* add a message in the builtins bundler that 0.8 is needed. it breaks on older versions lol.
* fixed
* rebase
Diffstat (limited to 'src/string_types.zig')
-rw-r--r-- | src/string_types.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_types.zig b/src/string_types.zig index 4697a5508..ce7a45f2f 100644 --- a/src/string_types.zig +++ b/src/string_types.zig @@ -55,7 +55,7 @@ pub const PathString = packed struct { pub inline fn init(str: string) @This() { @setRuntimeSafety(false); // "cast causes pointer to be null" is fine here. if it is null, the len will be 0. - return @This(){ + return .{ .ptr = @as(PointerIntType, @truncate(@intFromPtr(str.ptr))), .len = @as(PathInt, @truncate(str.len)), }; |