2 * Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
11 #include <errno_private.h>
16 remove(const char* path
)
18 // TODO: find a better way that does not require two syscalls for directories
19 int status
= _kern_unlink(-1, path
);
20 if (status
== B_IS_A_DIRECTORY
)
21 status
= _kern_remove_dir(-1, path
);