Skip to content

Commit bb35b69

Browse files
committed
Use exists() from VFSImpl base class and avoid using open() to check whether the file exists, because open() will log an error which is confusing, but might be relevant in case a developer uses open() and expects that the file is there.
espressif#7615
1 parent 4098c53 commit bb35b69

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Diff for: libraries/LittleFS/src/LittleFS.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@ class LittleFSImpl : public VFSImpl {
3333
public:
3434
LittleFSImpl();
3535
virtual ~LittleFSImpl() {}
36-
virtual bool exists(const char *path);
3736
};
3837

3938
LittleFSImpl::LittleFSImpl() {}
4039

41-
bool LittleFSImpl::exists(const char *path) {
42-
File f = open(path, "r", false);
43-
return (f == true);
44-
}
45-
4640
LittleFSFS::LittleFSFS() : FS(FSImplPtr(new LittleFSImpl())), partitionLabel_(NULL) {}
4741

4842
LittleFSFS::~LittleFSFS() {

0 commit comments

Comments
 (0)