25 memset( &fd_, 0,
sizeof( fd_ ) );
26 std::string srch = dirname;
29 hfd_ = FindFirstFile( srch.c_str(), &fd_ );
33 memset( &fd_, 0,
sizeof( fd_ ) );
38 if ( hfd_ != INVALID_HANDLE_VALUE )
41 hfd_ = INVALID_HANDLE_VALUE;
47 if ( hfd_ != INVALID_HANDLE_VALUE )
50 hfd_ = FindFirstFile( filespec, &fd_ );
55 return ( hfd_ == INVALID_HANDLE_VALUE );
65 if ( hfd_ != INVALID_HANDLE_VALUE )
67 if ( !FindNextFile( hfd_, &fd_ ) )
70 hfd_ = INVALID_HANDLE_VALUE;
76 #else // non-brain dead places where we can use POSIX functions 86 dir_ = opendir( dirname );
104 return (
dir_ == NULL );
116 struct dirent* de = readdir(
dir_ );
141 if ( getcwd( savedir_,
sizeof savedir_ ) == NULL )
142 ok_ = ( chdir( dir ) == 0 );
151 ok_ = ( chdir( savedir_ ) == 0 );
163 char cdir[_MAX_PATH];
167 if ( getcwd( cdir,
sizeof cdir ) == NULL )
void open(const char *filespec)
std::string normalized_dir_form(const std::string &istr)