4#include "AudioLogger.h"
5#include "AudioTools/Disk/AudioSource.h"
6#include "AudioTools/Disk/SDDirect.h"
20 start_path = startFilePath;
32 while (!SPIFFS.begin()) {
33 LOGE(
"SPIFFS.begin failed");
41 idx.begin(start_path, exension, file_name_pattern);
53 LOGI(
"nextStream: %d", offset);
58 LOGI(
"selectStream: %d",
index);
61 file_name = idx[
index];
62 if (file_name==
nullptr)
return nullptr;
63 LOGI(
"Using file %s", file_name);
64 file = SPIFFS.open(file_name);
65 return file ? &file :
nullptr;
70 file = SPIFFS.open(path);
71 file_name = file.name();
72 LOGI(
"-> selectStream: %s", path);
73 return file ? &file :
nullptr;
84 const char *
toStr() {
return file_name; }
90 virtual void setPath(
const char *p) { start_path = p; }
99 const char *file_name;
100 const char *exension =
nullptr;
101 const char *start_path =
nullptr;
102 const char *file_name_pattern =
"*";
103 bool is_sd_setup =
false;
VFSFile File
Desktop file system compatibility alias.
Definition File.h:12