static int isdir(wchar_t *filename) /* Is directory */ { struct stat buf; if (_Py_wstat(filename, &buf) != 0) return 0; if (!S_ISDIR(buf.st_mode)) return 0; return 1; }
static int isxfile(wchar_t *filename) /* Is executable file */ { struct stat buf; if (_Py_wstat(filename, &buf) != 0) return 0; if (!S_ISREG(buf.st_mode)) return 0; if ((buf.st_mode & 0111) == 0) return 0; return 1; }
/* Is directory */ static int isdir(wchar_t *filename) { struct stat buf; if (_Py_wstat(filename, &buf) != 0) { return 0; } if (!S_ISDIR(buf.st_mode)) { return 0; } return 1; }
static int isfile(wchar_t *filename) /* Is file, not directory */ { struct stat buf; if (_Py_wstat(filename, &buf) != 0) { return 0; } if (!S_ISREG(buf.st_mode)) { return 0; } return 1; }
/* Is executable file */ static int isxfile(wchar_t *filename) { struct stat buf; if (_Py_wstat(filename, &buf) != 0) { return 0; } if (!S_ISREG(buf.st_mode)) { return 0; } if ((buf.st_mode & 0111) == 0) { return 0; } return 1; }