EasyManua.ls Logo

DFRobot FireBeetle ESP32-E - Page 49

DFRobot FireBeetle ESP32-E
92 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
open()
Description: Opens a file on the SD card. If the file is opened for writing, it will be created if it doesn't already exist (but the directory
containing it must already exist). Grammar: SD.open( filename) SD.open(filenamemode)
Parameter:
filename the name the file to open, which can include directories (delimited by forward slashes, /) - char * mode (optional): the mode in
which to open the file, defaults to FILE_READ - byte. one of:
FILE_READ: open the file for reading; FILE_WRITE: open the file for reading and writing.
Return: a File object referring to the opened file: if the file couldn't be opened, this object will evaluate to false in a boolean
FILE_WRITE: open the file for reading and writing.
Return: a File object referring to the opened file;Return false if the file cannot be opened.
remove()
Description: Remove a file from the SD card. If the file didn't exist, the return value is unspecified, so it is better to use SD. Exists (file name)
to detect whether the file exists before removing the file.
Grammar: SD. remove( filename)
Parameter:
filenamethe name of the file to remove, which can include directories (delimited by forward-slashes, /)
Return:* boolean type. True if the removal of the file succeeded, false if not.
mkdir(filename)
Description: Create a directory on the SD card.
Parameter:
filename,the name of the directory to create, with sub-directories separated by forward-slashes, /
Return*: boolean type. True if the creation of the directory succeeded, false if not.
rmdir(filename)
Description: Remove a directory from the SD card. The directory must be empty. Grammar: SD.rmdir( filename)
Parameter: