Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement writing to archives #78

Merged
merged 40 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
78d5066
feat: implement temporary file creation (native and web)
white-axe Dec 17, 2023
bd000ff
perf: back archiver files with temp files instead of cursors
white-axe Dec 17, 2023
2556ca4
perf: archiver now uses a trie to cache paths
white-axe Dec 18, 2023
bbf20ca
fix: trie needs to create parent when removing dirs
white-axe Dec 18, 2023
7ce4136
style: remove redundant `use`
white-axe Dec 18, 2023
9adee29
fix: fix trie edge cases
white-axe Dec 18, 2023
9146347
style: remove `Arc` from `FileSystemTrie`
white-axe Dec 18, 2023
0fe22c9
refactor: temporary file creation now returns `std::io::Result`
white-axe Dec 18, 2023
d0e7898
feat: implement archive file writing for RMXP and RMVX
white-axe Dec 19, 2023
811ddce
fix: archive file flush now preserves temp file stream pos
white-axe Dec 19, 2023
bf383a7
style: `decrypt_file` now returns a file instead of an iterator
white-axe Dec 19, 2023
2f9be2c
chore: fix web build compilation errors
white-axe Dec 19, 2023
9453cf7
fix: fix list filesystem's file creation semantics
white-axe Dec 19, 2023
5ac5860
feat: implement file truncation
white-axe Dec 19, 2023
71fcecc
perf: optimize operations needed to write to archives
white-axe Dec 19, 2023
7068b39
style: rename misleading argument in `read_file_xor`
white-axe Dec 19, 2023
446808d
perf: don't flush archives unless modified
white-axe Dec 19, 2023
4c2574a
refactor: `File::metadata` now returns `std::io::Result`
white-axe Dec 19, 2023
f9a426a
refactor: remove all unsafe unwraps from the web filesystem
white-axe Dec 19, 2023
e929371
feat: implement `ExactSizeIterator` for `FileSystemTrieIter`
white-axe Dec 19, 2023
d403a0d
feat: implement archive file writing for RMVXA
white-axe Dec 19, 2023
34e7110
feat: update the trie after writing to the archive
white-axe Dec 20, 2023
e52d2c9
chore: fix misleading comment in trie.rs
white-axe Dec 20, 2023
9c5f132
fix: mark files as modified when truncating
white-axe Dec 20, 2023
042b9fb
feat: implement file creation in archives
white-axe Dec 20, 2023
9a0c858
refactor: move archive file truncation into utility function
white-axe Dec 20, 2023
46d8a12
refactor: add utility function `as_file` to files
white-axe Dec 20, 2023
58967e3
refactor: store file header offsets
white-axe Dec 20, 2023
b7b8a60
fix: fix edge cases for RMVXA archives in `move_file_and_truncate`
white-axe Dec 20, 2023
069a64b
feat: implement removing files and dirs in archives
white-axe Dec 21, 2023
9b9a528
fix: fix edge case in `FileSystemTrieIter`
white-axe Dec 21, 2023
7ebcb7a
fix: don't allow file truncation without write access
white-axe Dec 21, 2023
864cd79
feat: implement renaming files in archives
white-axe Dec 21, 2023
117e32d
feat: implement directory creation in archives
white-axe Dec 21, 2023
9c43cc2
refactor: split archiver filesystem into smaller files
white-axe Dec 21, 2023
6040c26
style: remove unnecessary generics
white-axe Dec 21, 2023
febf1fd
chore: satiate clippy, the all-seeing
white-axe Dec 21, 2023
0f7c7cc
style: `&mut impl Read` -> `impl Read`
white-axe Dec 21, 2023
b98b4c4
style: remove `&mut` from `read_file_xor` as well
white-axe Dec 21, 2023
92a3352
merge: merge branch 'dev' into archive-write
white-axe Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion crates/filesystem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,19 @@ tracing.workspace = true

luminol-config.workspace = true

rand.workspace = true

iter-read = "1.0.1"
qp-trie = "0.8.2"

[target.'cfg(windows)'.dependencies]
winreg = "0.51.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tempfile = "3.8.1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
once_cell.workspace = true
rand.workspace = true
slab.workspace = true

luminol-web = { version = "0.4.0", path = "../web/" }
Expand All @@ -69,4 +76,8 @@ web-sys = { version = "0.3", features = [
"FileSystemRemoveOptions",
"FileSystemWritableFileStream",
"WritableStream",

"Navigator",
"StorageManager",
"Window",
] }
Loading
Loading