mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-26 11:13:16 +03:00
Remove DirDelete, implementation did not work and memory contraints are recursive. Better implemented on client side...
This commit is contained in:
parent
2e10b0fe64
commit
f4322841ff
@ -102,23 +102,6 @@ int FS::Stat(const char* path, lfs_info* info) {
|
||||
lfs_ssize_t FS::GetFSSize() {
|
||||
return lfs_fs_size(&lfs);
|
||||
}
|
||||
// Delete directory and all files inside
|
||||
int FS::DirDelete(const char* path) {
|
||||
|
||||
lfs_dir_t lfs_dir;
|
||||
lfs_info entryInfo;
|
||||
|
||||
int err;
|
||||
err = lfs_dir_open(&lfs, &lfs_dir, path);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
while (lfs_dir_read(&lfs, &lfs_dir, &entryInfo)) {
|
||||
lfs_remove(&lfs, entryInfo.name);
|
||||
}
|
||||
lfs_dir_close(&lfs, &lfs_dir);
|
||||
return LFS_ERR_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
@ -26,10 +26,11 @@ namespace Pinetime {
|
||||
int DirRead(lfs_dir_t* dir, lfs_info* info);
|
||||
int DirRewind(lfs_dir_t* dir);
|
||||
int DirCreate(const char* path);
|
||||
int DirDelete(const char* path);
|
||||
|
||||
lfs_ssize_t GetFSSize();
|
||||
int Stat(const char* path, lfs_info* info);
|
||||
void VerifyResource();
|
||||
|
||||
static size_t getSize() {
|
||||
return size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user