1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00
Commit Graph

3 Commits

Author SHA1 Message Date
Jonathan Coates
367773e173
Some refactoring of mounts
- Separate FileMount into separate FileMount and WritableFileMount
   classes. This separates the (relatively simple) read-only code from
   the (soon to be even more complex) read/write code.

   It also allows you to create read-only mounts which don't bother with
   filesystem accounting, which is nice.

 - Make openForWrite/openForAppend always return a SeekableFileHandle.
   Appendable files still cannot be seeked within, but that check is now
   done on the FS side.

 - Refactor the various mount tests to live in test contract interfaces,
   allowing us to reuse them between mounts.

 - Clean up our error handling a little better. (Most) file-specific code
   has been moved to FileMount, and ArchiveMount-derived classes now
   throw correct path-localised exceptions.
2022-12-09 22:02:31 +00:00
Jonathan Coates
fc5f296eeb
Make Mount.openForRead always return a SeekableByteChannel
I want to make some further changes to Mount here, but this helps
simplify BinaryReadableHandle a little.
2022-12-03 18:20:50 +00:00
Jonathan Coates
c96172e78d
Refactor common {Jar,Resource}Mount code into a parent class 2022-12-03 18:02:12 +00:00