mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
docs/reference/filesystem: Add note and example about using filesystem.
This commit is contained in:
@@ -156,6 +156,13 @@ As it supports the extended interface, it can be used with :class:`littlefs
|
||||
os.VfsLfs2.mkfs(bdev)
|
||||
os.mount(bdev, '/ramdisk')
|
||||
|
||||
Once mounted, the filesystem (regardless of its type) can be used as it
|
||||
normally would be used from Python code, for example::
|
||||
|
||||
with open('/ramdisk/hello.txt', 'w') as f:
|
||||
f.write('Hello world')
|
||||
print(open('/ramdisk/hello.txt').read())
|
||||
|
||||
Filesystems
|
||||
-----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user