Browse Source

Clean way

lorol 4 years ago
parent
commit
5c7e13875a
2 changed files with 4 additions and 26 deletions
  1. 3 0
      README.md
  2. 1 26
      src/LITTLEFS.cpp

+ 3 - 0
README.md

@@ -54,3 +54,6 @@ packages\esp32\tools\mkspiffs\<mklittlefs rev. x.x.x>\ or on checkout (dev) envi
 - This work is based on [Mbed LittleFS](https://github.com/ARMmbed/littlefs) , [ESP-IDF port of joltwallet/esp_littlefs](https://github.com/joltwallet/esp_littlefs) , [Espressif Arduino core for the ESP32, the ESP-IDF - SPIFFS Library](https://github.com/espressif/arduino-esp32/tree/master/libraries/SPIFFS)
 - Licensed under GPL v2 ([text](LICENSE))
 
+## To Do
+
+- Supporting different IDF versions 

+ 1 - 26
src/LITTLEFS.cpp

@@ -12,13 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-//esp_err_t esp_vfs_littlefs_register(const esp_vfs_littlefs_conf_t * conf);
-
-//esp_err_t esp_vfs_littlefs_unregister(const char* partition_label);
-//esp_err_t esp_littlefs_format(const char* partition_label);
-//esp_err_t esp_littlefs_info(const char* partition_label, size_t *total_bytes, size_t *used_bytes);
-
-//#define LFS_NAME "spiffs"
 static constexpr const char LFS_NAME[] = "spiffs";
 
 #include "vfs_api.h"
@@ -34,25 +27,7 @@ extern "C" {
 
 using namespace fs;
 
-class LITTLEFSImpl : public VFSImpl
-{
-public:
-    LITTLEFSImpl();
-    virtual ~LITTLEFSImpl() { }
-    virtual bool exists(const char* path);
-};
-
-LITTLEFSImpl::LITTLEFSImpl()
-{
-}
-
-bool LITTLEFSImpl::exists(const char* path)
-{
-    File f = open(path, "r");
-    return (f == true) && !f.isDirectory();
-}
-
-LITTLEFSFS::LITTLEFSFS() : FS(FSImplPtr(new LITTLEFSImpl()))
+LITTLEFSFS::LITTLEFSFS() : FS(FSImplPtr(new VFSImpl()))
 {
 
 }