SDCard

Function Description

SD card read and write operations

open sdcard file mode Open the specified file and perform a read or write operation. This file must exist in the r and r+ states, otherwise an error is reported. The a, w, and w+ modes are automatically created if no files exist.

file read all Read all the bytes of the file

file read bytes Read the given number of bytes

file read line Read a line of content

file write Write bytes to the file

file set seek Set the offset position of the read

file get seek Get the current offset position

sdcard listdir List the specified catalog file

file mkdir Set the offset position of the read

sdcard remove Delete specified file

sdcard rmdir Delete the specified directory

sdcard rename File rename

Instructions

Create a test folder, create a file named TEST.text, write helloM5Stack, and read M5Stack

On This Page