57 lasterr = 0; dhandle = 0;
58 if (path && strlen(path) > 0) {
60 dhandle = (
void *)
opendir(path);
64 WIN32_FIND_DATA filedata;
65 dhandle = (
void *) ::FindFirstFile(path, &filedata);
66 if ((HANDLE)dhandle == INVALID_HANDLE_VALUE) {
70 else if (!(filedata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
89 ::FindClose((HANDLE)dhandle);
109 #if !defined(WINDOWS)
110 struct dirent *ent =
readdir((DIR *)dhandle);
115 dent = (
char *) ent->d_name;
118 WIN32_FIND_DATA filedata;
119 if (::FindNextFile((HANDLE)dhandle, &filedata)) {
120 dent = (
char *) filedata.cFileName;
122 if (::GetLastError() != ERROR_NO_MORE_FILES)
struct dirent * readdir(DIR *dirp)
DIR * opendir(const char *path)
XrdSysDir(const char *path)