Skip to content

Commit

Permalink
revise the fs module
Browse files Browse the repository at this point in the history
  • Loading branch information
dfgordon committed Aug 10, 2024
1 parent 00cac79 commit 4cd70eb
Show file tree
Hide file tree
Showing 50 changed files with 3,874 additions and 2,359 deletions.
33 changes: 18 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,43 @@
* `a2kit verify` performs a much deeper language analysis
* Disassembler for 6502, 65c02, and 65816
* Limited assembler for Merlin 8, 16, 16+, 32
* deliberating: pass multiple files through pipe at once
* deliberating: revised pipeline stages
* new CLI subcommands `mget` and `mput` for efficient multi-file handling
* new CLI subcommands `pack` and `unpack` for direct manipulation of file images

## Other Updates

* You can glob (search) a disk image using `a2kit glob`
* Applesoft optionally accepts extended CALL syntax
* Integer optionally accepts immediate mode commands
* Better renumbering
* Better handling of 16 bit Merlin syntax
* Better ProDOS Y2K handling
* Beter handling of CP/M files with no extension
* Better handling of CP/M files with no extension
* `catalog` has `--generic` option for easy parsing with any file system
* deliberating: `get` has `-t auto` to automatically select a decoding strategy
* `get` has `-t auto` to automatically select a decoding strategy
* More control over JSON formatting
* Eliminate some possible panics

## Internals
## Breaking Changes

* New trait functions `catalog_to_vec`
* deliberating: New trait functions `load_any`, `fimg_file_data`, `fimg_load_address`

## Breaking
Breaking changes are all at the level of the library. CLI scripts written for v2 should still work with v3, *unless* a user's JSON parser is checking the *length* of certain arrays.

* Extracting files from a disk image works differently
- The `FileImage` object handles packing or unpacking various data types, while `DiskFS` works only with `FileImage`.
- `DiskFS` has convenience functions similar to the old `save`, `bsave`, etc., but some arguments and return values have changed.
- `TextConversion` trait replaces `TextEncoder` trait
* Enumerations that are extended: `ItemType`, some `Error` enumerations scoped by module
* Syntax tree walker is different
- `Visit` and `WalkerChoice` are replaced by `Navigate` and `Navigation`
* FileImage 2.1.0 is the default, this simply adds the `accessed` key which can be used by FAT file systems
* Functions with updated return values
* FileImage 2.1.0 is the default, this adds two root level keys
- `full_path` key which is mainly useful for `mput`
- `accessed` key which can be used by FAT file systems
* Functions calls that will need to be reviewed
- `a2kit_macro::DiskStruct::from_bytes`
- `a2kit_macro::DiskStruct::update_from_bytes`
- `img::DiskImage::from_bytes`
- `fs::<>::Disk::from_img`
- `crate::try_img`
* Functions with updated argument types
- `a2kit_macro::DiskStruct::from_bytes`
- `a2kit_macro::DiskStruct::update_from_bytes`
- `img::DiskImage::from_bytes`
* Sector sizes are included in track solutions as a fourth element in the CHS map subarrays
- The outward facing `geometry` subcommand still uses the `chs_map` key, so user parsers will still succeed if they ignore extra array elements.
* `FileImage::desequence` clears the chunk map before updating chunks, while `Records::update_fimg` does so optionally
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ regex = "1.10"
[dependencies]
log = "0.4.17"
glob = "0.3.1"
globset = "0.4.14"
bit-vec = "0.6.3"
env_logger = "0.11.3"
hex = "0.4.3"
Expand Down
Loading

0 comments on commit 4cd70eb

Please sign in to comment.