From: Stefan Esser Date: Sun, 28 Jul 2002 18:41:48 +0000 (+0000) Subject: MFH 2 X-Git-Tag: php-4.2.3RC1~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10e8ca4b3b340064996079b4b773a089847ef287;p=php MFH 2 --- diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index fcf5e583e8..f8c88c163f 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -561,6 +561,19 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ RETURN_FALSE; } +#ifndef PHP_WIN32 + switch (type) { + case FS_IS_W: + RETURN_BOOL (!access (filename, W_OK)); + case FS_IS_R: + RETURN_BOOL (!access (filename, R_OK)); + case FS_IS_X: + RETURN_BOOL (!access (filename, X_OK)); + case FS_EXISTS: + RETURN_BOOL (!access (filename, F_OK)); + } +#endif + stat_sb = &BG(sb); if (!BG(CurrentStatFile) || strcmp(filename, BG(CurrentStatFile))) {