arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
VFS_Multi.h
1#pragma once
2#include "AudioTools/CoreAudio/AudioBasic/Collections/Vector.h"
3#include "AudioTools/Disk/VFS.h"
4
5namespace audio_tools {
6
14class VFS_Multi : public VFS {
15 public:
17 void add(VFS& vfs, const char* mountPoint) {
19 vfs_vector.push_back(&vfs);
20 }
22 bool begin() override {
23 bool result = true;
24 for (int j = 0; j < vfs_vector.size(); j++) {
25 result = result && vfs_vector[j]->begin();
26 }
27 return result;
28 }
29 // unmount the file systems
30 void end() override {
31 for (int j = 0; j < vfs_vector.size(); j++) {
32 vfs_vector[j]->end();
33 }
34 }
36 virtual void setMountPoint(const char* mp) { LOGE("not supported"); }
37
38 protected:
39 Vector<VFS*> vfs_vector;
40};
41
42} // namespace audio_tools
Define multipe VFS with their mount point.
Definition VFS_Multi.h:14
virtual void setMountPoint(const char *mp)
Not used!
Definition VFS_Multi.h:36
void add(VFS &vfs, const char *mountPoint)
adds a vfs with the corresponding mount point
Definition VFS_Multi.h:17
void end() override
unmount the file system
Definition VFS_Multi.h:30
bool begin() override
mount the file systems
Definition VFS_Multi.h:22
Definition VFS.h:16
virtual void setMountPoint(const char *mp)=0
provide the mount point (root directory for the file system)
const char * mountPoint()
provides the actual mount point
Definition VFS.h:55
Vector implementation which provides the most important methods as defined by std::vector....
Definition Vector.h:21
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition AudioCodecsBase.h:10