src/sgp/FileMan.cc
/** Open file for reading.  Look file in folderPath in case-insensitive manner. */
Open file for reading.  Look file in folderPath in case-insensitive manner.
Open file for reading . Look file in folderPath in case - insensitive manner .
FILE* FileMan::openForReadingCaseInsensitive(const std::string &folderPath, const char *filename)
{
	int mode;
	const char* fmode = GetFileOpenModes(FILE_ACCESS_READ, &mode);
	int d = openFileCaseInsensitive(folderPath, filename, mode);
	if(d >= 0)
	{
		FILE* hFile = fdopen(d, fmode);
		if (hFile == NULL)
		{
			close(d);
		}
		else
		{
			return hFile;
		}
	}
	return NULL;
}
FILE * FileMan :: openForReadingCaseInsensitive ( const std :: string & folderPath , const char * filename ) { int mode ; const char * fmode = GetFileOpenModes ( FILE_ACCESS_READ , & mode ) ; int d = openFileCaseInsensitive ( folderPath , filename , mode ) ; if ( d >= 0 ) { FILE * hFile = fdopen ( d , fmode ) ; if ( hFile == NULL ) { close ( d ) ; } else { return hFile ; } } return NULL ; }
Open file for reading.
Open file for reading .