mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Adding seek() and size() functions to SD File class.
This commit is contained in:
parent
53f3e8ef92
commit
5057d5b109
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user