-
- /*
- * Visual studio also lacks S_ISDIR for sys/stat.h, so we emulate this as well
- * which is not hard at all.
- */
-# undef S_ISDIR
-# define S_ISDIR(X) ((X)&_S_IFDIR)
-#elif !defined(__MINGW32__)
- #include <sys/stat.h> /* mkdir */
- #include <unistd.h> /* chdir */
-
- int fs_dir_make(const char *path) {
- return mkdir(path, 0700);
- }
-
- DIR *fs_dir_open(const char *name) {
- return opendir(name);
- }
-
- int fs_dir_close(DIR *dir) {
- return closedir(dir);
- }
-
- struct dirent *fs_dir_read(DIR *dir) {
- return readdir(dir);
- }
-
- int fs_dir_change(const char *path) {
- return chdir(path);
- }