storage --- storage management

The storage provides storage management functionality such as mounting and unmounting which is typically handled by the operating system hosting Python. CircuitPython does not have an OS, so this module provides this functionality directly.

storage.mount(filesystem, mount_path, *, readonly=False)

Mounts the given filesystem object at the given path.

This is the CircuitPython analog to the UNIX mount command.


Unmounts the given filesystem object or if mount is a path, then unmount the filesystem mounted at that location.

This is the CircuitPython analog to the UNIX umount command.

storage.remount(mount_path, readonly)

Remounts the given path with new parameters.


Erase and re-create the CIRCUITPY filesystem. Then call microcontroller.reset() to restart CircuitPython and have the host computer remount CIRCUITPY.

This function can be called from the REPL when CIRCUITPY has become corrupted.


All the data on CIRCUITPY will be lost, and CircuitPython will restart.

class storage.VfsFat(block_device)

Create a new VfsFat filesystem around the given block device.

Parameters:block_device -- Block device the the filesystem lives on