io: path: implement deleting (empty) directories
This commit is contained in:
@@ -237,7 +237,7 @@ enum b_status b_path_stat(const b_path *path, struct b_file_info *out)
|
|||||||
|
|
||||||
enum b_status b_path_unlink(const b_path *path)
|
enum b_status b_path_unlink(const b_path *path)
|
||||||
{
|
{
|
||||||
int err = unlink(b_string_ptr(path->pathstr));
|
int err = remove(b_string_ptr(path->pathstr));
|
||||||
return err == 0 ? B_SUCCESS : b_status_from_errno(errno, B_ERR_IO_FAILURE);
|
return err == 0 ? B_SUCCESS : b_status_from_errno(errno, B_ERR_IO_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user