aboutsummaryrefslogtreecommitdiff
path: root/lib/std/tar
AgeCommit message (Collapse)Author
2025-10-29compiler: update for introduction of std.IoAndrew Kelley
only thing remaining is using libc dns resolution when linking libc
2025-10-29std.Io: bring back Timestamp but also keep Clock.TimestampAndrew Kelley
this feels better
2025-10-29std: updating to std.Io interfaceAndrew Kelley
got the build runner compiling
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-08-13std.io.Writer.Allocating: rename getWritten() to written()Isaac Freund
This "get" is useless noise and was copied from FixedBufferWriter. Since this API has not yet landed in a release, now is a good time to make the breaking change to fix this.
2025-08-10std.fs.File.Reader.getSize: check file kind on statAndrew Kelley
closes #24794
2025-07-22std.tar: delete function redundant with std.memAndrew Kelley
2025-07-22std.tar.Writer: delete ill-advised APIAndrew Kelley
dependency on time is sus
2025-07-22std.tar.Writer: fix 32-bitAndrew Kelley
2025-07-22std.tar: update to new I/O APIAndrew Kelley
2025-04-16std.tar: pass entry kind to rootDir to avoid setting root_dir to file (#23456)Tobias Simetsreiter
2024-10-04Remove old deprecated symbols in std (#21584)PauloCampana
Also, actually run tests inside std/tar/writer.zig
2024-08-15std.tar: add writer (#19603)Igor Anić
Simplifies code in docs creation where we used `std.tar.output.Header`. Writer uses that Header internally and provides higher level interface. Updates checksum on write, handles long file names, allows setting mtime and file permission mode. Provides handy interface for passing `Dir.WalkerEntry`.
2024-07-09std: fix typos (#20560)Jora Troosh
2024-06-13std: Convert deprecated aliases to compile errors and fix usagesRyan Liptak
Deprecated aliases that are now compile errors: - `std.fs.MAX_PATH_BYTES` (renamed to `std.fs.max_path_bytes`) - `std.mem.tokenize` (split into `tokenizeAny`, `tokenizeSequence`, `tokenizeScalar`) - `std.mem.split` (split into `splitSequence`, `splitAny`, `splitScalar`) - `std.mem.splitBackwards` (split into `splitBackwardsSequence`, `splitBackwardsAny`, `splitBackwardsScalar`) - `std.unicode` + `utf16leToUtf8Alloc`, `utf16leToUtf8AllocZ`, `utf16leToUtf8`, `fmtUtf16le` (all renamed to have capitalized `Le`) + `utf8ToUtf16LeWithNull` (renamed to `utf8ToUtf16LeAllocZ`) - `std.zig.CrossTarget` (moved to `std.Target.Query`) Deprecated `lib/std/std.zig` decls were deleted instead of made a `@compileError` because the `refAllDecls` in the test block would trigger the `@compileError`. The deleted top-level `std` namespaces are: - `std.rand` (renamed to `std.Random`) - `std.TailQueue` (renamed to `std.DoublyLinkedList`) - `std.ChildProcess` (renamed/moved to `std.process.Child`) This is not exhaustive. Deprecated aliases that I didn't touch: + `std.io.*` + `std.Build.*` + `std.builtin.Mode` + `std.zig.c_translation.CIntLiteralRadix` + anything in `src/`
2024-05-01std.tar: fix finding tar root_dir (#19829)Igor Anić
For issue #19820.
2024-04-02std.tar: implement executable bit onlyIgor Anić
2024-03-11std.tar: use doctestIgor Anić
Make std.tar look better in docs. Remove from public interface what is not necessary. Add comment to the public methods. Add doctest as usage examples for iterator and pipeToFileSystem.
2024-03-11std.tar: fix path testing on windowsIgor Anić
Fixing ci error: error: 'tar.test.test.pipeToFileSystem' failed: slices differ. first difference occurs at index 2 (0x2) ============ expected this output: ============= len: 9 (0x9) 2E 2E 2F 61 2F 66 69 6C 65 ../a/file ============= instead found this: ============== len: 9 (0x9) 2E 2E 5C 61 5C 66 69 6C 65 ..\a\file After #19136 dir.symlink changes path separtors to \ on windows.
2024-03-11std.tar make iterator interface more ergonomicIgor Anić
for the then end users: 1. Don't require user to call file.skip() on file returned from iterator.next if file is not read. Iterator will now handle this. Previously that returned header parsing error, without knowing some tar internals it is hard to understand what is required from user. 2. Use iterator.File.kind enum which is similar to fs.File.Kind, something familiar. Internal Header.Kind has many types which are not exposed but the user needs to have else in kind switch to cover those cases. 3. Add reader interface to the iterator.File.
2024-03-11std.tar: don't return in iterator initIgor Anić
Don't assert min buffer size on iterator init. That was changing public interface. This way we don't break that interface.
2024-03-11std.tar: remove redundant test name prefixesIgor Anić
2024-03-11std.tar: test buffers provided to the iteratorIgor Anić
Tar header stores name in max 256 bytes and link name in max 100 bytes. Those are minimums for provided buffers. Error is raised during iterator init if buffers are not long enough. Pax and gnu extensions can store longer names. If such extension is reached during unpack and don't fit into provided buffer error is returned.
2024-03-11std.tar: add tests for file and symlink createIgor Anić
Should do that before I broke package manager!
2024-03-10-femit-docs: creating sources.tarAndrew Kelley
It's always a good day when you get to use File.writeFileAll 😎
2024-02-29Re-enable and fix tar pipeToFileSystem test on WindowsRyan Liptak
2024-02-29Merge pull request #19126 from ianic/tar_case_sensitiveAndrew Kelley
std.tar: fix unconditional error return
2024-02-29std.tar: disable test failing on windowsIgor Anić
Just to pass ci of regression fix #19126. I'll return to this later. Currently can't reproduce on my Windows wm, here I'm failing on symlink creation in ci fails later in the process.
2024-02-28std.tar.iterator: make the buffers configurableAndrew Kelley
Provides more API flexibility and correctness, while still preserving the handy high level `pipeToFileSystem` API.
2024-02-26Merge pull request #19081 from ianic/tar_case_sensitiveAndrew Kelley
std.tar don't overwrite files on unpack
2024-02-25std.tar skip test on windowsIgor Anić
Or other platform which don't support symlinks.
2024-02-25std.tar improve error reportingIgor Anić
Report file name which failed to create in all cases.
2024-02-25std.tar add case sensitive file name testIgor Anić
Like in issue #18089, this tar contains, same file name in two case sensitive name version. Unpack should fail on case insensitive file systems and succeed on case sensitive. $ tar tvf 18089.tar 18089/ 18089/alacritty/ 18089/alacritty/darkermatrix.yml 18089/alacritty/Darkermatrix.yml
2024-02-24std.tar don't overwrite existing fileIgor Anić
Fail with error if file already exists. File is not silently overwritten but an error is raised. Fixes: #18089
2024-02-24std.tar fix assert exploited by fuzzingIgor Anić
2024-02-22fix crash in tar found by fuzzingIgor Anić
Running fuzzing tar test with [zig std lib fuzzing](https://github.com/squeek502/zig-std-lib-fuzzing) reached and assert in tar implementation. Assert (in std lib) should not be reachable by external input, so I'm fixing this to return error.
2024-01-13tar: rename reader to iteratorIgor Anić
Itarator has `next` function, iterates over tar files. When using from outside of module with `tar.` prefix makes more sense. var iter = tar.iterator(reader, null); while (try iter.next()) |file| { ... }
2024-01-13tar: use @embedFile in testsIgor Anić
Like in other tests which uses testdata files (compress). That enables wasi testing also, was failing because file system operations in tests.
2024-01-13tar: fix tests on 32-bit platformsIgor Anić
2024-01-13tar: move test cases to std/tar/testdataIgor Anić
Create std/tar/test.zig for test which uses cases from testdata.