summaryrefslogtreecommitdiff
path: root/src/fileops.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-03-01 12:10:06 -0800
committerVicent Martí <vicent@github.com>2013-03-01 12:10:06 -0800
commit426b2e2fce17b09203f00e013e173328f50fd9e8 (patch)
tree550f4e6314038033bbbced49b5934e1706405278 /src/fileops.h
parentcc427158d4fafa26e3d2d9f69da51a1a8d8a92d4 (diff)
parent926acbcf8ed80a69ab82f3d14e90dabeca9af07d (diff)
downloadlibgit2-426b2e2fce17b09203f00e013e173328f50fd9e8.tar.gz
Merge pull request #1378 from jamill/clone_no_delete
Clone should not clean up directories it did not create
Diffstat (limited to 'src/fileops.h')
-rw-r--r--src/fileops.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fileops.h b/src/fileops.h
index 5495b12cd..f01f22706 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -128,7 +128,7 @@ typedef enum {
/**
* Remove path and any files and directories beneath it.
*
- * @param path Path to to top level directory to process.
+ * @param path Path to the top level directory to process.
* @param base Root for relative path.
* @param flags Combination of git_futils_rmdir_flags values
* @return 0 on success; -1 on error.
@@ -136,6 +136,14 @@ typedef enum {
extern int git_futils_rmdir_r(const char *path, const char *base, uint32_t flags);
/**
+ * Remove all files and directories beneath the specified path.
+ *
+ * @param path Path to the top level directory to process.
+ * @return 0 on success; -1 on error.
+ */
+extern int git_futils_cleanupdir_r(const char *path);
+
+/**
* Create and open a temporary file with a `_git2_` suffix.
* Writes the filename into path_out.
* @return On success, an open file descriptor, else an error code < 0.