123456789101112131415161718192021222324252627282930313233343536 |
- #include "FileHandle.h"
- #include "platform/mbed_retarget.h"
- #include "platform/mbed_critical.h"
- namespace mbed {
- off_t FileHandle::size()
- {
-
- off_t off = seek(0, SEEK_CUR);
- if (off < 0) {
- return off;
- }
-
- off_t size = seek(0, SEEK_END);
-
- seek(off, SEEK_SET);
- return size;
- }
- }
|