docs: Use vfs module instead of os.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-02-02 13:51:18 +11:00
parent 7d28789544
commit 4c56b39051
12 changed files with 65 additions and 65 deletions

View File

@@ -20,11 +20,11 @@ more info regarding the pins which can be remapped to be used with a SD card.
Example usage::
from machine import SD
import os
import vfs
# clk cmd and dat0 pins must be passed along with
# their respective alternate functions
sd = machine.SD(pins=('GP10', 'GP11', 'GP15'))
os.mount(sd, '/sd')
vfs.mount(sd, '/sd')
# do normal file operations
Constructors

View File

@@ -30,7 +30,7 @@ vary from platform to platform.
The class implements the block protocol defined by :class:`vfs.AbstractBlockDev`.
This allows the mounting of an SD card to be as simple as::
os.mount(machine.SDCard(), "/sd")
vfs.mount(machine.SDCard(), "/sd")
The constructor takes the following parameters:

View File

@@ -213,7 +213,7 @@ Miscellaneous functions
.. function:: mount(device, mountpoint, *, readonly=False, mkfs=False)
.. note:: This function is deprecated. Mounting and unmounting devices should
be performed by :meth:`os.mount` and :meth:`os.umount` instead.
be performed by :meth:`vfs.mount` and :meth:`vfs.umount` instead.
Mount a block device and make it available as part of the filesystem.
``device`` must be an object that provides the block protocol. (The