arduino-audio-tools
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SDDirect< SDT, FileT > Class Template Reference

We access the files directy with an index. The index is determined by a recurseve tree walk thru the directory. Unfortunatly the SDTFAT library has it's own API which is incompatible with the SD API. More...

#include <SDDirect.h>

Public Member Functions

 SDDirect (SDT &sd)
 
void begin (const char *startDir, const char *extension, const char *file_name_pattern)
 
const char * operator[] (int idx)
 Access file name by index.
 
long size ()
 Provides the number of files.
 

Protected Member Functions

const char * fileName (FileT &file)
 Returns the filename w/o path.
 
const char * fileNamePath (FileT &file)
 Returns the filename including the path.
 
bool isDirectory (FileT &f)
 
bool isHidden (FileT &f)
 
bool isValidAudioFile (FileT &file)
 checks if the file is a valid audio file
 
void listDir (const char *dirname)
 Writes the index file.
 
FileT open (const char *name)
 
FileT openNext (FileT &dir)
 
void popPath ()
 
void pushPath (const char *name)
 
void rewind (FileT &f)
 

Protected Attributes

int32_t actual_idx
 
const char * ext = nullptr
 
const char * file_name_pattern = nullptr
 
List< String > file_path_stack
 
String file_path_str
 
bool found = false
 
long max_idx = -1
 
SDT * p_sd = nullptr
 
size_t requested_idx
 
String result
 
const char * start_dir
 

Detailed Description

template<class SDT, class FileT>
class audio_tools::SDDirect< SDT, FileT >

We access the files directy with an index. The index is determined by a recurseve tree walk thru the directory. Unfortunatly the SDTFAT library has it's own API which is incompatible with the SD API.


The documentation for this class was generated from the following file: