memfs icon indicating copy to clipboard operation
memfs copied to clipboard

Map existing files for reading to MemFs

Open theldoria opened this issue 11 years ago • 3 comments

It would be great if I could map existing files into MemFs virtual file system for reading:

MemFs.map("my_file", "my_other_file") # Map file "my_file", "my_other_file"
MemFs.map("my_files_directory") # Map directory "my_file_directory"
MemFs.map("my_files_directory" => "my_virtual_directory") # Map directory "my_file_directory" to "my_virtual_directory"

theldoria avatar Jul 25 '14 07:07 theldoria

That's a very good idea. Would you be able to propose an implementation for this? :) When you say "map directory", do you mean mapping all files and sub-directories recursively?

simonc avatar Jul 25 '14 07:07 simonc

Sure, I can prepare a pull request.

Regarding "map Directory": yes, mapping of directories is ment to be recursively.

theldoria avatar Jul 25 '14 08:07 theldoria

Awesome! :) Keep me posted and ask anything if you need help ;)

simonc avatar Jul 25 '14 08:07 simonc