summaryrefslogtreecommitdiff
path: root/utils/file.h
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-24 21:01:25 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-24 21:01:25 +0000
commit5dd1a81f9c97d852faa54e0d96482b69739fe8dc (patch)
tree9636f2e3bf0cd72645645e3ab3cc0290ea86779b /utils/file.h
parent921568166bc924f2c5e587095012d7a34a472ed5 (diff)
downloadnetsurf-5dd1a81f9c97d852faa54e0d96482b69739fe8dc.tar.gz
netsurf-5dd1a81f9c97d852faa54e0d96482b69739fe8dc.tar.bz2
utils/file: Add netsurf_recursive_rm
This is to be used to remove the disc cache (and other things if useful in the future) Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'utils/file.h')
-rw-r--r--utils/file.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/file.h b/utils/file.h
index 0282c350e..809ffe419 100644
--- a/utils/file.h
+++ b/utils/file.h
@@ -172,4 +172,15 @@ nserror netsurf_path_to_nsurl(const char *path, struct nsurl **url);
*/
nserror netsurf_mkdir_all(const char *fname);
+/**
+ * Recursively remove a directory
+ *
+ * If this returns a failure code, there's an unpredictable amount left
+ * unremoved.
+ *
+ * @param path The path to recursively remove
+ * @return NSERROR_OK on success, or an error code on failure.
+ */
+nserror netsurf_recursive_rm(const char *path);
+
#endif