| 313 | } |
| 314 | |
| 315 | int FileSystem::close(FileHandle file) |
| 316 | { |
| 317 | CHECK_MOUNTED() |
| 318 | |
| 319 | if(file < 0) { |
| 320 | return Error::InvalidHandle; |
| 321 | } |
| 322 | |
| 323 | int res = flushMeta(file); |
| 324 | int err = SPIFFS_close(handle(), file); |
| 325 | if(err < 0) { |
| 326 | res = translateSpiffsError(err); |
| 327 | } |
| 328 | partition.sync(); |
| 329 | return res; |
| 330 | } |
| 331 | |
| 332 | int FileSystem::eof(FileHandle file) |
| 333 | { |
no test coverage detected