-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix #2750 #2763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2750 #2763
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,26 +14,37 @@ | |
| #ifndef _SPIFFS_H_ | ||
| #define _SPIFFS_H_ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "FS.h" | ||
| #include "FSImpl.h" | ||
|
||
| #include "vfs_api.h" | ||
|
||
|
|
||
| namespace fs | ||
| { | ||
|
|
||
| class SPIFFSImpl : public VFSImpl | ||
| { | ||
| public: | ||
| SPIFFSImpl(); | ||
| virtual ~SPIFFSImpl() { } | ||
| virtual bool exists(const char* path); | ||
| }; | ||
|
|
||
| class SPIFFSFS : public FS | ||
| { | ||
| public: | ||
| SPIFFSFS(FSImplPtr impl); | ||
| SPIFFSFS(); | ||
| bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10); | ||
| bool format(); | ||
| size_t totalBytes(); | ||
| size_t usedBytes(); | ||
| void end(); | ||
| bool exists(const char* path); | ||
| bool exists(const String& path); | ||
| }; | ||
|
|
||
| } | ||
|
|
||
| extern fs::SPIFFSFS SPIFFS; | ||
|
|
||
| #endif /* _SPIFFS_H_ */ | ||
|
|
||
| #endif | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is redundant with the above. keep one or the other :)