=========== idFileSystemLocal::OpenExplicitFileRead =========== */
| 3250 | =========== |
| 3251 | */ |
| 3252 | idFile *idFileSystemLocal::OpenExplicitFileRead( const char *OSPath ) { |
| 3253 | idFile_Permanent *f; |
| 3254 | |
| 3255 | if ( !searchPaths ) { |
| 3256 | common->FatalError( "Filesystem call made without initialization\n" ); |
| 3257 | } |
| 3258 | |
| 3259 | if ( fs_debug.GetInteger() ) { |
| 3260 | common->Printf( "idFileSystem::OpenExplicitFileRead: %s\n", OSPath ); |
| 3261 | } |
| 3262 | |
| 3263 | common->DPrintf( "idFileSystem::OpenExplicitFileRead - reading from: %s\n", OSPath ); |
| 3264 | |
| 3265 | f = new idFile_Permanent(); |
| 3266 | f->o = OpenOSFile( OSPath, "rb" ); |
| 3267 | if ( !f->o ) { |
| 3268 | delete f; |
| 3269 | return NULL; |
| 3270 | } |
| 3271 | f->name = OSPath; |
| 3272 | f->fullPath = OSPath; |
| 3273 | f->mode = ( 1 << FS_READ ); |
| 3274 | f->handleSync = false; |
| 3275 | f->fileSize = DirectFileLength( f->o ); |
| 3276 | |
| 3277 | return f; |
| 3278 | } |
| 3279 | |
| 3280 | /* |
| 3281 | =========== |
no test coverage detected