Hi,
I have to rewrite a part of my code, concerning the SD card.
My goal is list the content of SD card.
If it does nit exiate, create a 2024 folder
CD the 2024 folder and if the month folder does not exist, create it
Cd the month folder and the day folder does not exist, create it
I look at this example file. I can see
File file;
File root;
then here, I can see
root.open("/")
and finally, here I can see
file.open("Folder1/file1.txt", O_WRONLY | O_CREAT)
What's the difference between root.open()
and file.open()
as both come from File?
EDIT: Another question come into my minde. Here you can read sd.chdir("Folder1")
What would be the difference between sd.chdir("/")
and root.open("/")
. In mine point of view sd.chdir("/")
would be used to navigate into the SD, and root.
and file.
would be use to read a file, but how could you read "/"?