Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/FS/src/FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool File::seek(uint32_t pos, SeekMode mode) {

size_t File::position() const {
if (!*this) {
return 0;
return (size_t)-1;
}

return _p->position();
Expand Down
2 changes: 1 addition & 1 deletion libraries/FS/src/FS.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class File : public Stream {
bool seek(uint32_t pos) {
return seek(pos, SeekSet);
}
size_t position() const;
size_t position() const; // returns (size_t)-1 on error
size_t size() const;
bool setBufferSize(size_t size);
void close();
Expand Down