| 370 | */ |
| 371 | |
| 372 | bool FatFileSystem::openFile(const char *filename,File*& newFile) { |
| 373 | |
| 374 | DirectoryEntryWithLocation dirent; |
| 375 | |
| 376 | // tokenise the path |
| 377 | |
| 378 | TokenisedPathname tp(filename); |
| 379 | if(tp.getNumTokens() == 0) |
| 380 | return errorProvider.set(ErrorProvider::ERROR_PROVIDER_FILESYSTEM,E_INVALID_PATHNAME); |
| 381 | |
| 382 | // get the directory entry for this file |
| 383 | |
| 384 | if(!getDirectoryEntry(tp,dirent)) |
| 385 | return false; |
| 386 | |
| 387 | // create the file object |
| 388 | |
| 389 | newFile=new FatFile(*this,dirent); |
| 390 | return true; |
| 391 | } |
| 392 | |
| 393 | /** |
| 394 | * Return true if directory has content (files or directories). |
no test coverage detected