Browse Source

Add File truncate(size)

teensy4-core
PaulStoffregen 4 years ago
parent
commit
36bfbd1648
3 changed files with 9 additions and 0 deletions
  1. +3
    -0
      teensy/FS.h
  2. +3
    -0
      teensy3/FS.h
  3. +3
    -0
      teensy4/FS.h

+ 3
- 0
teensy/FS.h View File

virtual void flush() { virtual void flush() {
if (f) f->flush(); if (f) f->flush();
} }
virtual bool truncate(uint64_t size=0) {
return (f) ? f->truncate(size) : false;
}
virtual bool seek(uint64_t pos, int mode) { virtual bool seek(uint64_t pos, int mode) {
return (f) ? f->seek(pos, mode) : false; return (f) ? f->seek(pos, mode) : false;
} }

+ 3
- 0
teensy3/FS.h View File

virtual void flush() { virtual void flush() {
if (f) f->flush(); if (f) f->flush();
} }
virtual bool truncate(uint64_t size=0) {
return (f) ? f->truncate(size) : false;
}
virtual bool seek(uint64_t pos, int mode) { virtual bool seek(uint64_t pos, int mode) {
return (f) ? f->seek(pos, mode) : false; return (f) ? f->seek(pos, mode) : false;
} }

+ 3
- 0
teensy4/FS.h View File

virtual void flush() { virtual void flush() {
if (f) f->flush(); if (f) f->flush();
} }
virtual bool truncate(uint64_t size=0) {
return (f) ? f->truncate(size) : false;
}
virtual bool seek(uint64_t pos, int mode) { virtual bool seek(uint64_t pos, int mode) {
return (f) ? f->seek(pos, mode) : false; return (f) ? f->seek(pos, mode) : false;
} }

Loading…
Cancel
Save