mirror of
https://github.com/uutils/tar.git
synced 2026-06-10 16:14:35 -07:00
aa5fb1a952
* Implement minimal create and extract operations Adds basic tar archive functionality using tar-rs library with proper error handling infrastructure. Core Implementation: - TarError enum implementing UError for uucore integration - Extract operation (-x) for unpacking tar archives - Create operation (-c) for creating tar archives from files/directories - Verbose mode (-v) for both operations - Proper CLI argument parsing with -f flag for archive file Error Handling: - Comprehensive error types (IoError, InvalidArchive, FileNotFound, etc.) - Proper error conversion from io::Error - UError trait implementation for exit code handling This provides the minimal foundation for tar functionality. Both create and extract are included together since they depend on each other for testing purposes. Includes 18 tests total: - 8 integration tests (CLI basics, create/extract operations, error handling) - 10 unit tests (CLI flag parsing, error type handling) - Unit tests organized in src/uu/tar/tests/ separate from implementation Note: Run `cargo test --workspace` to execute all tests including unit tests. * Re-add cognitive complexity warning suppression for uu_app function * Sort out tar/tarapp conflict Rename package from "tar" to "tarapp" in Cargo.toml and update dependencies to use workspace for tar. * fix(errors): improve error handling and exit codes for tar operations - Updated error messages for file not found and permission denied cases. - Fix exit codes for various TarError types to conform to standard. - Refactored extract_archive to use new error handling. - Adjusted tests to reflect updated exit codes. * Update for error changes (fixes cargo test --all) * Use arg! macro and comment out rather than remove the unimplemented items. * fix(create): Remove duplicate message for missing files in create_archive --------- Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
24 lines
221 B
Plaintext
24 lines
221 B
Plaintext
# spell-checker:ignore (misc) direnv
|
|
|
|
target/
|
|
coverage/
|
|
/src/*/gen_table
|
|
/build/
|
|
/tmp/
|
|
/busybox/
|
|
/.vscode/
|
|
/.vs/
|
|
/public/
|
|
*~
|
|
.*.swp
|
|
.*.swo
|
|
.idea
|
|
lib*.a
|
|
/docs/_build
|
|
*.iml
|
|
### macOS ###
|
|
.DS_Store
|
|
|
|
### direnv ###
|
|
/.direnv/
|