diff options
| author | Russell Belfer <arrbee@arrbee.com> | 2012-01-17 15:49:47 -0800 |
|---|---|---|
| committer | Russell Belfer <arrbee@arrbee.com> | 2012-01-17 15:49:47 -0800 |
| commit | 1744fafec05d8fa3036a43f5e390c790810b05a5 (patch) | |
| tree | b87f0616dd832ec66cc2450b5751b70d468a350e /src/win32/dir.h | |
| parent | d1317f1b69cafb328ca9b263b2b71cddeb2290be (diff) | |
| download | libgit2-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 'src/win32/dir.h')
| -rw-r--r-- | src/win32/dir.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/win32/dir.h b/src/win32/dir.h new file mode 100644 index 000000000..b16a3cfeb --- /dev/null +++ b/src/win32/dir.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2009-2011 the libgit2 contributors + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_dir_h__ +#define INCLUDE_dir_h__ + +#include "common.h" + +struct git__dirent { + int d_ino; + char d_name[261]; +}; + +typedef struct { + HANDLE h; + WIN32_FIND_DATAW f; + struct git__dirent entry; + char *dir; + int first; +} git__DIR; + +extern git__DIR *git__opendir(const char *); +extern struct git__dirent *git__readdir(git__DIR *); +extern void git__rewinddir(git__DIR *); +extern int git__closedir(git__DIR *); + +# ifndef GIT__WIN32_NO_WRAP_DIR +# define dirent git__dirent +# define DIR git__DIR +# define opendir git__opendir +# define readdir git__readdir +# define rewinddir git__rewinddir +# define closedir git__closedir +# endif + +#endif /* INCLUDE_dir_h__ */ |
