diff --git a/source/lib/sysdep/filesystem.h b/source/lib/sysdep/filesystem.h index e2c21d35b1..1988274daa 100644 --- a/source/lib/sysdep/filesystem.h +++ b/source/lib/sysdep/filesystem.h @@ -55,11 +55,4 @@ extern int wopen(const OsPath& pathname, int oflag); extern int wopen(const OsPath& pathname, int oflag, mode_t mode); extern int wclose(int fd); - -// -// sys/stat.h -// - -int wmkdir(const OsPath& path, mode_t mode); - #endif // #ifndef INCLUDED_SYSDEP_FILESYSTEM diff --git a/source/lib/sysdep/os/unix/ufilesystem.cpp b/source/lib/sysdep/os/unix/ufilesystem.cpp index 60631ad354..612e6fb215 100644 --- a/source/lib/sysdep/os/unix/ufilesystem.cpp +++ b/source/lib/sysdep/os/unix/ufilesystem.cpp @@ -97,8 +97,3 @@ int wrename(const OsPath& pathnameOld, const OsPath& pathnameNew) { return rename(OsString(pathnameOld).c_str(), OsString(pathnameNew).c_str()); } - -int wmkdir(const OsPath& path, mode_t mode) -{ - return mkdir(OsString(path).c_str(), mode); -} diff --git a/source/lib/sysdep/os/win/wposix/wfilesystem.cpp b/source/lib/sysdep/os/win/wposix/wfilesystem.cpp index 66a48b6704..0561721fda 100644 --- a/source/lib/sysdep/os/win/wposix/wfilesystem.cpp +++ b/source/lib/sysdep/os/win/wposix/wfilesystem.cpp @@ -129,34 +129,3 @@ int wclose(int fd) return _close(fd); return 0; } - - -static int ErrnoFromCreateDirectory() -{ - switch(GetLastError()) - { - case ERROR_ALREADY_EXISTS: - return EEXIST; - case ERROR_PATH_NOT_FOUND: - return ENOENT; - case ERROR_ACCESS_DENIED: - return EACCES; - case ERROR_WRITE_PROTECT: - return EROFS; - case ERROR_DIRECTORY: - return ENOTDIR; - default: - return 0; - } -} - -int wmkdir(const OsPath& path, mode_t) -{ - if(!CreateDirectoryW(OsString(path).c_str(), (LPSECURITY_ATTRIBUTES)NULL)) - { - errno = ErrnoFromCreateDirectory(); - return -1; - } - - return 0; -}