Skip to content

Dir listing  #2

@Misfittech

Description

@Misfittech

I tired to do a directory listing on exfat and it seems to fail. I can open the SD card, but the root "/" getName() returns '\0', then openNext() returns false.

bool ret=SD.begin( PIN_SD_CS);
if (ret == false)
{
ERROR("SD error %d",ret);//,TO_MHZ(48)));//,,&SPI2));
}

	FsFile dir,f;
	char str[50];
	dir=SD.open("/");
	dir.getName(str,50);
	LOG("%s",str);
	uint32_t i=0;
	while (dir.openNext(&f) && i<170)
	{
		f.getName(str,50);
		LOG("%s",str);
		i++;
	}
	dir.close();
	f.close();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions