summaryrefslogtreecommitdiff
path: root/tests/test_helpers.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-01-17 15:49:47 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-01-17 15:49:47 -0800
commit1744fafec05d8fa3036a43f5e390c790810b05a5 (patch)
treeb87f0616dd832ec66cc2450b5751b70d468a350e /tests/test_helpers.c
parentd1317f1b69cafb328ca9b263b2b71cddeb2290be (diff)
downloadlibgit2-1744fafec05d8fa3036a43f5e390c790810b05a5.tar.gz
Move path related functions from fileops to path
This takes all of the functions that look up simple data about paths (such as `git_futils_isdir`) and moves them over to path.h (becoming `git_path_isdir`). This leaves fileops.h just with functions that actually manipulate the filesystem or look at the file contents in some way. As part of this, the dir.h header which is really just for win32 support was moved into win32 (with some minor changes).
Diffstat (limited to 'tests/test_helpers.c')
-rw-r--r--tests/test_helpers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_helpers.c b/tests/test_helpers.c
index 40b3499bb..42c8031cd 100644
--- a/tests/test_helpers.c
+++ b/tests/test_helpers.c
@@ -238,8 +238,8 @@ static int copy_filesystem_element_recurs(void *_data, git_buf *source)
git_buf_truncate(&data->dst, data->dst_baselen);
git_buf_puts(&data->dst, source->ptr + data->src_baselen);
- if (git_futils_isdir(source->ptr) == GIT_SUCCESS)
- return git_futils_direach(source, copy_filesystem_element_recurs, _data);
+ if (git_path_isdir(source->ptr) == GIT_SUCCESS)
+ return git_path_direach(source, copy_filesystem_element_recurs, _data);
else
return copy_file(source->ptr, data->dst.ptr);
}
@@ -252,8 +252,8 @@ int copydir_recurs(
copydir_data data = { GIT_BUF_INIT, 0, GIT_BUF_INIT, 0 };
/* Source has to exist, Destination hast to _not_ exist */
- if (git_futils_isdir(source_directory_path) != GIT_SUCCESS ||
- git_futils_isdir(destination_directory_path) == GIT_SUCCESS)
+ if (git_path_isdir(source_directory_path) != GIT_SUCCESS ||
+ git_path_isdir(destination_directory_path) == GIT_SUCCESS)
return GIT_EINVALIDPATH;
git_buf_joinpath(&data.src, source_directory_path, "");
@@ -298,8 +298,8 @@ static int remove_placeholders_recurs(void *_data, git_buf *path)
remove_data *data = (remove_data *)_data;
size_t pathlen;
- if (!git_futils_isdir(path->ptr))
- return git_futils_direach(path, remove_placeholders_recurs, data);
+ if (!git_path_isdir(path->ptr))
+ return git_path_direach(path, remove_placeholders_recurs, data);
pathlen = path->size;
@@ -321,7 +321,7 @@ int remove_placeholders(const char *directory_path, const char *filename)
remove_data data;
git_buf buffer = GIT_BUF_INIT;
- if (git_futils_isdir(directory_path))
+ if (git_path_isdir(directory_path))
return GIT_EINVALIDPATH;
if ((error = git_buf_sets(&buffer, directory_path)) < GIT_SUCCESS)