Closed nyuware closed 1 year ago
paging the Filesystem
API designer @e3krisztian to get their take on this
I would not complicate carve
and friends with append functionality, as those are specialized convenience functions.
I think FileSystem.open()
should cover this more generic usage.
open
will return a normal file object for random access. If you need to open the same file several times, just seek to the end before writing, but I think you can get by with a single open in this case.
Is your feature request related to a problem? Please describe. I'm currently writing a handler for the EWF file format, this format is usually used for single disk images destined to be used in recoveries or criminal investigations. While using the FileSystem class, it's currently not possible to extract a single file using
fs.carve
orfs.write_bytes
orfs.write_chunks
.Doing this
entry_path = Path("ewf.decrypted")
would result intoErrno 17: file already exists
Describe the solution you'd like The ability to create a single file, perhaps re-adjusting the flags of those functions to allow the creation of a single file Perhaps giving the ability of using "ab" instead of "wb" while opening a file ?
Additional context Here is my current code, I'm using the offset of the chunks I'm currently extracting, because there is no other way to name it