diff --git a/libraries/SD/File.cpp b/libraries/SD/File.cpp index d09bd8f85..e12b81bc1 100644 --- a/libraries/SD/File.cpp +++ b/libraries/SD/File.cpp @@ -51,6 +51,14 @@ void File::flush() { SD.file.sync(); } +boolean File::seek(uint32_t pos) { + return SD.file.seekSet(pos); +} + +uint32_t File::size() { + return SD.file.fileSize(); +} + void File::close() { SD.file.close(); } diff --git a/libraries/SD/SD.h b/libraries/SD/SD.h index d013bcfc5..bda862d54 100644 --- a/libraries/SD/SD.h +++ b/libraries/SD/SD.h @@ -33,6 +33,8 @@ public: virtual int peek(); virtual int available(); virtual void flush(); + boolean seek(uint32_t pos); + uint32_t size(); void close(); operator bool(); };