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

A single file system via MemoryFileSystem? #49

Open
cs-util opened this issue Apr 18, 2020 · 1 comment
Open

A single file system via MemoryFileSystem? #49

cs-util opened this issue Apr 18, 2020 · 1 comment
Labels

Comments

@cs-util
Copy link

cs-util commented Apr 18, 2020

Would it be the correct approach to use MemoryFileSystem if I want to create a virtual file system that is persisted to disk in a single file?

At some point I would then have to take the data from the MemoryFileSystem and dump it to disc, is that possible or is there a better way to achieve this?

@xoofx xoofx added the question label Apr 19, 2020
@xoofx
Copy link
Owner

xoofx commented Apr 19, 2020

Would it be the correct approach to use MemoryFileSystem if I want to create a virtual file system that is persisted to disk in a single file?

Not really. MemoryFileSystem is really meant for in-memory manipulation. What might be similar to what you are looking for is to copy the memory file system to another file system which would store it differently (e.g ZipFileSystem, or TarFileSystem...etc.), or to work with these filesystems storage directly.

Otherwise, you can always dump a MemoryFileSystem to a PhysicalFileSystem with the latest 0.8.0 version (CopyTo extension on a filesystem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants