lib: xpc: implement support for iterating through directories

This commit is contained in:
2026-03-24 12:41:12 +00:00
parent 1eb6853cb0
commit 30614e679b
6 changed files with 61 additions and 3 deletions

View File

@@ -52,3 +52,15 @@ enum fs_status fs_file_write(
f->f_seek = seek;
return status;
}
enum fs_status fs_file_readdir(struct fs_file *f, struct xpc_buffer *buf)
{
if (!f->f_ops || !f->f_ops->f_readdir) {
return FS_ERR_NOT_IMPLEMENTED;
}
off_t seek = f->f_seek;
enum fs_status status = f->f_ops->f_readdir(f, buf, &seek);
f->f_seek = seek;
return status;
}