We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0adf787 commit 0ab2c58Copy full SHA for 0ab2c58
libraries/FS/src/FS.cpp
@@ -105,7 +105,7 @@ bool File::seek(uint32_t pos, SeekMode mode) {
105
106
size_t File::position() const {
107
if (!*this) {
108
- return 0;
+ return (size_t)-1;
109
}
110
111
return _p->position();
libraries/FS/src/FS.h
@@ -64,7 +64,7 @@ class File : public Stream {
64
bool seek(uint32_t pos) {
65
return seek(pos, SeekSet);
66
67
- size_t position() const;
+ size_t position() const; // returns (size_t)-1 on error
68
size_t size() const;
69
bool setBufferSize(size_t size);
70
void close();
0 commit comments