|
AquilaOS documentation
How it works, and its code
|
Removing a name by its path: unlink() and rmdir(). More...
Go to the source code of this file.
Functions | |
| static int | vfs_remove (const char *path, struct uio *uio, int rmdir) |
| Removes the entry at a path, which must be an empty directory if rmdir is set, and anything but a directory otherwise. | |
| int | vfs_unlink (const char *path, struct uio *uio) |
| Removes the name of a file (not a directory) at a path. | |
| int | vfs_rmdir (const char *path, struct uio *uio) |
| Removes an empty directory at a path. | |
Removing a name by its path: unlink() and rmdir().
Definition in file unlink.c.
|
static |
Removes the entry at a path, which must be an empty directory if rmdir is set, and anything but a directory otherwise.
The caller needs write and search permission on the directory it's in.
Definition at line 11 of file unlink.c.
References kfree(), vnode::mode, NULL, vfs_access(), vfs_close(), vfs_dir_empty(), vfs_finddir(), vfs_lookup_parent(), vfs_remove(), vfs_vget(), vfs_vunlink(), VFS_W, and VFS_X.
Referenced by vfs_remove(), vfs_rmdir(), and vfs_unlink().
| int vfs_rmdir | ( | const char * | path, |
| struct uio * | uio ) |
Removes an empty directory at a path.
| path | the path |
| uio | who is asking |
Definition at line 74 of file unlink.c.
References vfs_remove(), and vfs_rmdir().
Referenced by do_unlinkat(), and vfs_rmdir().
| int vfs_unlink | ( | const char * | path, |
| struct uio * | uio ) |
Removes the name of a file (not a directory) at a path.
The file goes when its last name is removed and nothing has it open.
| path | the path |
| uio | who is asking |
Definition at line 62 of file unlink.c.
References vfs_remove(), and vfs_unlink().
Referenced by do_unlinkat(), socket_unix_bind(), vfs_symlink(), and vfs_unlink().