Browse Source

Add truncate(size)

main
PaulStoffregen 4 years ago
parent
commit
fcd678d66f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/SD.h

+ 3
- 0
src/SD.h View File

virtual size_t read(void *buf, size_t nbyte) { virtual size_t read(void *buf, size_t nbyte) {
return sdfatfile.read(buf, nbyte); return sdfatfile.read(buf, nbyte);
} }
virtual bool truncate(uint64_t size=0) {
return sdfatfile.truncate(size);
}
virtual bool seek(uint64_t pos, int mode = SeekSet) { virtual bool seek(uint64_t pos, int mode = SeekSet) {
if (mode == SeekSet) return sdfatfile.seekSet(pos); if (mode == SeekSet) return sdfatfile.seekSet(pos);
if (mode == SeekCur) return sdfatfile.seekCur(pos); if (mode == SeekCur) return sdfatfile.seekCur(pos);

Loading…
Cancel
Save