Function sys_vfs_remove

Source
pub fn sys_vfs_remove(trapframe: &mut Trapframe) -> usize
Expand description

Remove a file or directory (unified VfsRemove)

This system call provides a unified interface for removing both files and directories, replacing the traditional separate unlink (for files) and rmdir (for directories) operations with a single system call.

For directories, they must be empty to be removed successfully.

§Arguments

  • trapframe.get_arg(0) - Pointer to the null-terminated path string

§Returns

  • 0 on success
  • usize::MAX on error (file/directory not found, permission denied, directory not empty, etc.)