Skip to content

lfs.c:Support get file path#975

Closed
crafcat7 wants to merge 1 commit intolittlefs-project:masterfrom
crafcat7:master
Closed

lfs.c:Support get file path#975
crafcat7 wants to merge 1 commit intolittlefs-project:masterfrom
crafcat7:master

Conversation

@crafcat7
Copy link
Copy Markdown

I added two new interfaces to obtain the path of the file/folder.

int lfs_dir_path(lfs_t *lfs, lfs_dir_t *dir, char *path, lfs_size_t size);
int lfs_file_path(lfs_t *lfs, lfs_file_t *file, char *path, lfs_size_t size);

Mainly rely on a new internal interface, to a recursive search target

static lfs_ssize_t lfs_dir_path_(lfs_t *lfs,
         lfs_mdir_t *dir, uint16_t id, char *path, lfs_size_t size)

Signed-off-by: crafcat7 <crafcat7@outlook.com>
@crafcat7
Copy link
Copy Markdown
Author

Modify the local commit branch and merge the new PR to
#976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant