authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-03-06 20:17:23-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-25 13:48:43-04:00
log8c8813a5cfa710478614cbb022481f830f199bad
treea2491993bf2ffca496fdea7c10ea04f151387d2e
parentce5b2286f1db3d5a01ce139b450140f21c9d9909

Add filesystem base64 decoder


1 files changed, 6 insertions(+), 0 deletions(-)

lib/std/fs.zig+6
...@@ -55,6 +55,12 @@ pub const base64_encoder = base64.Base64Encoder.init(...@@ -55,6 +55,12 @@ pub const base64_encoder = base64.Base64Encoder.init(
55 base64.standard_pad_char,55 base64.standard_pad_char,
56);56);
5757
58/// Base64, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem.
59pub const base64_decoder = base64.Base64Decoder.init(
60 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
61 base64.standard_pad_char,
62);
63
58/// Whether or not async file system syscalls need a dedicated thread because the operating64/// Whether or not async file system syscalls need a dedicated thread because the operating
59/// system does not support non-blocking I/O on the file system.65/// system does not support non-blocking I/O on the file system.
60pub const need_async_thread = std.io.is_async and switch (builtin.os.tag) {66pub const need_async_thread = std.io.is_async and switch (builtin.os.tag) {