From 8bb672e6a088eb77d98d182bd46551986b52eb49 Mon Sep 17 00:00:00 2001 From: Thomas Wienecke Date: Tue, 4 Mar 2014 20:50:48 +0100 Subject: Port mch_isdir to libuv. --- src/os_unix.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/os_unix.c') diff --git a/src/os_unix.c b/src/os_unix.c index fdbaba466a..4ba7b79611 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1319,26 +1319,6 @@ void mch_hide(char_u *name) /* can't hide a file */ } -/* - * return TRUE if "name" is a directory - * return FALSE if "name" is not a directory - * return FALSE for error - */ -int mch_isdir(char_u *name) -{ - struct stat statb; - - if (*name == NUL) /* Some stat()s don't flag "" as an error. */ - return FALSE; - if (stat((char *)name, &statb)) - return FALSE; -#ifdef _POSIX_SOURCE - return S_ISDIR(statb.st_mode) ? TRUE : FALSE; -#else - return (statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE; -#endif -} - int executable_file(char_u *name); /* -- cgit