mirror of
https://github.com/theoludwig/libcproject.git
synced 2024-12-11 21:13:00 +01:00
feat: add filesystem_remove
This commit is contained in:
parent
ad0a460923
commit
dff2836bfc
@ -31,6 +31,10 @@ bool filesystem_exists(string_t path) {
|
|||||||
return access(path, F_OK) == 0;
|
return access(path, F_OK) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int filesystem_remove(string_t path) {
|
||||||
|
return remove(path);
|
||||||
|
}
|
||||||
|
|
||||||
string_t filesystem_get_mimetype(string_t path) {
|
string_t filesystem_get_mimetype(string_t path) {
|
||||||
if (string_ends_with(path, ".html")) {
|
if (string_ends_with(path, ".html")) {
|
||||||
return "text/html";
|
return "text/html";
|
||||||
|
@ -47,6 +47,17 @@ int filesystem_write(string_t path, byte_t *file_content, off_t file_size);
|
|||||||
*/
|
*/
|
||||||
bool filesystem_exists(string_t path);
|
bool filesystem_exists(string_t path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Removes a path.
|
||||||
|
*
|
||||||
|
* @param path
|
||||||
|
* @return int
|
||||||
|
* @retval -1 if there is an error.
|
||||||
|
* @retval 0 for success.
|
||||||
|
* @since v3.1.0
|
||||||
|
*/
|
||||||
|
int filesystem_remove(string_t path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the mimetype of a file.
|
* @brief Get the mimetype of a file.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user