Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement writing to archives (Astrabit-ST#78)
* feat: implement temporary file creation (native and web) * perf: back archiver files with temp files instead of cursors * perf: archiver now uses a trie to cache paths * fix: trie needs to create parent when removing dirs * style: remove redundant `use` Blame my language server for whatever this is. * fix: fix trie edge cases * style: remove `Arc` from `FileSystemTrie` * refactor: temporary file creation now returns `std::io::Result` * feat: implement archive file writing for RMXP and RMVX * fix: archive file flush now preserves temp file stream pos * style: `decrypt_file` now returns a file instead of an iterator * chore: fix web build compilation errors * fix: fix list filesystem's file creation semantics The list filesystem should only create files in filesystems where the parent directory of the file exists. * feat: implement file truncation * perf: optimize operations needed to write to archives * style: rename misleading argument in `read_file_xor` * perf: don't flush archives unless modified * refactor: `File::metadata` now returns `std::io::Result` * refactor: remove all unsafe unwraps from the web filesystem * feat: implement `ExactSizeIterator` for `FileSystemTrieIter` * feat: implement archive file writing for RMVXA * feat: update the trie after writing to the archive * chore: fix misleading comment in trie.rs * fix: mark files as modified when truncating * feat: implement file creation in archives * refactor: move archive file truncation into utility function * refactor: add utility function `as_file` to files * refactor: store file header offsets * fix: fix edge cases for RMVXA archives in `move_file_and_truncate` * feat: implement removing files and dirs in archives * fix: fix edge case in `FileSystemTrieIter` * fix: don't allow file truncation without write access * feat: implement renaming files in archives * feat: implement directory creation in archives * refactor: split archiver filesystem into smaller files * style: remove unnecessary generics * chore: satiate clippy, the all-seeing * style: `&mut impl Read` -> `impl Read` * style: remove `&mut` from `read_file_xor` as well
- Loading branch information