Add FS::FileSeek method with whence

This commit is contained in:
Felipe Martinez 2024-07-08 13:01:27 +00:00
parent 3556687e2e
commit 9bc75c5d3c
2 changed files with 6 additions and 1 deletions

View file

@ -70,7 +70,11 @@ int FS::FileWrite(lfs_file_t* file_p, const uint8_t* buff, uint32_t size) {
}
int FS::FileSeek(lfs_file_t* file_p, uint32_t pos) {
return lfs_file_seek(&lfs, file_p, pos, LFS_SEEK_SET);
return FileSeek(file_p, pos, LFS_SEEK_SET);
}
int FS::FileSeek(lfs_file_t* file_p, uint32_t pos, int whence) {
return lfs_file_seek(&lfs, file_p, pos, whence);
}
int FS::FileDelete(const char* fileName) {

View file

@ -17,6 +17,7 @@ namespace Pinetime {
int FileRead(lfs_file_t* file_p, uint8_t* buff, uint32_t size);
int FileWrite(lfs_file_t* file_p, const uint8_t* buff, uint32_t size);
int FileSeek(lfs_file_t* file_p, uint32_t pos);
int FileSeek(lfs_file_t* file_p, uint32_t pos, int whence);
int FileDelete(const char* fileName);