Description:
- Work with data in memory. In-Memory Object Storage FileSystem based on Trie data-structure.
Resources:
Example 1
Section titled “Example 1”Create text files in memory and find them
from pathlib import Pathfrom morefs.memory import MemFS
fs = MemFS()
# Create a dir and define files to be createdfp = "/tmp/ganymede_demo"path = Path(fp).mkdir(exist_ok=True)test_fp1 = f"{fp}/test1.txt"test_fp2 = f"{fp}/test2.txt"
# Create the files in memoryfs.touch(test_fp1)fs.touch(test_fp2)
files = fs.find("")print(files)ganymede is made by Eugo