summaryrefslogtreecommitdiff
path: root/src/components/fs
diff options
context:
space:
mode:
authorTim Keller <geekboy1011@gmail.com>2021-10-17 23:07:43 +0000
committerTim Keller <geekboy1011@gmail.com>2021-12-10 01:18:57 +0000
commit3a8e66a52fcc6317a7dffa15cb161f37a645d36c (patch)
tree47a7933fff4ba86159068a756b6a9903d6475078 /src/components/fs
parenteabbbfa373de04d1dc694618d5a9d475f0918592 (diff)
Added Delete file
Added FS Stat.
Diffstat (limited to 'src/components/fs')
-rw-r--r--src/components/fs/FS.cpp4
-rw-r--r--src/components/fs/FS.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/components/fs/FS.cpp b/src/components/fs/FS.cpp
index 353193dc..d30b7373 100644
--- a/src/components/fs/FS.cpp
+++ b/src/components/fs/FS.cpp
@@ -96,6 +96,10 @@ int FS::DirCreate(const char* path) {
return lfs_mkdir(&lfs, path);
}
+int FS::Stat(const char* path, lfs_info* info){
+ return lfs_stat(&lfs,path,info);
+}
+
// Delete directory and all files inside
int FS::DirDelete(const char* path) {
diff --git a/src/components/fs/FS.h b/src/components/fs/FS.h
index ccff2409..e50ff10a 100644
--- a/src/components/fs/FS.h
+++ b/src/components/fs/FS.h
@@ -28,6 +28,7 @@ namespace Pinetime {
int DirCreate(const char* path);
int DirDelete(const char* path);
+ int Stat(const char* path, lfs_info* info);
void VerifyResource();
private: