SD-CARD-LIBRARY - Spark-SpeedTest.cpp - Change directory


somebody could please help me with an example opening a different folder than the root one?

having a look inside SdFile.cpp definition i understand i would need something like:

SdFile path;
SdFile file;


if (!, "pic.jpg", O_RDWR)) {
    error("open failed");

but i dont see which method to use to change directory



try changing this line: path.openfolder("myflolder"); to something like path.openfolder("/subfolder");

? :slight_smile:

Hi @kennethlimcp

this part of code is made up just for the purpose of explaining what im trying to do :slight_smile:


what i would need to know, if it’s possible, is how to open a folder with SdFile so that i can pass the instance opening a file.

Look at this line:

You should probably just need to change the path to achieve that…