提交 ceaed2dc 编写于 作者: L Leon Chan

feat: add file type support for LfsStat

close #I3ZCDR
Signed-off-by: NLeon Chan <chenwei26@huawei.com>
上级 77338f4c
......@@ -743,6 +743,11 @@ int LfsStat(const char *path, struct stat *buf)
ret = lfs_stat(&(fileOpInfo->lfsInfo), path, &info);
if (ret == 0) {
buf->st_size = info.size;
if (info.type == LFS_TYPE_REG) {
buf->st_mode = S_IFREG;
} else {
buf->st_mode = S_IFDIR;
}
} else {
errno = LittlefsErrno(ret);
ret = VFS_ERROR;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册