summaryrefslogtreecommitdiffstats
path: root/include/cutils/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cutils/fs.h')
-rw-r--r--include/cutils/fs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/cutils/fs.h b/include/cutils/fs.h
index 70f0b9291..be9e819dc 100644
--- a/include/cutils/fs.h
+++ b/include/cutils/fs.h
@@ -40,11 +40,18 @@ extern "C" {
#endif
/*
- * Ensure that directory exists with given mode and owners.
+ * Ensure that directory exists with given mode and owners. If it exists
+ * with a different mode or owners, they are fixed to match the given values.
*/
extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
/*
+ * Ensure that directory exists with given mode and owners. If it exists
+ * with different owners, they are not fixed and -1 is returned.
+ */
+extern int fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
+
+/*
* Read single plaintext integer from given file, correctly handling files
* partially written with fs_write_atomic_int().
*/