file.dart
file.dart copied to clipboard
Memory/Real filesystem hybrid
It would be nice to have something like MemoryFileSystem that can be initialized from an actual directory on disk. Write operations would always write to memory. Read operations would check for an in-memory version of the file first, and if it didn't find it check for an on-disk version.
Today, there are tests in flutter_tool that have to initialize an in memory FS, copy a bunch of stuff from disk, and then go on their way. The proposal here is to let us lazily do that copy so we only end up with more memory usage (and data copying) if we attempt to modify a file (rather than just read it).
/cc @jonahwilliams