--- a/src/server/daemon/vfs.c Sun May 31 13:08:42 2020 +0200 +++ b/src/server/daemon/vfs.c Sun May 31 16:58:23 2020 +0200 @@ -55,6 +55,7 @@ sys_vfs_fdopendir, sys_vfs_mkdir, sys_vfs_unlink, + sys_vfs_rmdir, VFS_CHECKS_ACL, NULL }; @@ -267,6 +268,12 @@ return vfs_path_op(ctx, path, ctx->vfs->unlink, ACL_DELETE); } +int vfs_rmdir(VFSContext *ctx, const char *path) { + WS_ASSERT(ctx); + WS_ASSERT(path); + + return vfs_path_op(ctx, path, ctx->vfs->rmdir, ACL_DELETE); +} // private int vfs_path_op(VFSContext *ctx, const char *path, vfs_op_f op, uint32_t access) { @@ -512,6 +519,10 @@ return sys_path_op(ctx, path, sys_unlink); } +int sys_vfs_rmdir(VFSContext *ctx, const char *path) { + return sys_path_op(ctx, path, sys_rmdir); +} + int sys_path_op(VFSContext *ctx, const char *path, sys_op_f op) { uint32_t access_mask = ctx->aclreqaccess; @@ -667,6 +678,10 @@ return unlink(path); } +int sys_rmdir(VFSContext *ctx, const char *path, SysACL *sysacl) { + return rmdir(path); +} + /* public file api */ NSAPI_PUBLIC int system_fread(SYS_FILE fd, void *buf, int nbyte) {