| 534 | } |
| 535 | |
| 536 | FileRef MountSystem::openFile(const Path& path,File::AccessMode mode) |
| 537 | { |
| 538 | FileNodeRef node = getFileNode(path); |
| 539 | if (node != NULL) |
| 540 | { |
| 541 | FileRef file = dynamic_cast<File*>(node.getPointer()); |
| 542 | if (file != NULL) |
| 543 | { |
| 544 | if (file->open(mode)) |
| 545 | return file; |
| 546 | else |
| 547 | return NULL; |
| 548 | } |
| 549 | } |
| 550 | else |
| 551 | { |
| 552 | if (mode != File::Read) |
| 553 | { |
| 554 | FileRef file = createFile(path); |
| 555 | |
| 556 | if (file != NULL) |
| 557 | { |
| 558 | file->open(mode); |
| 559 | return file; |
| 560 | } |
| 561 | } |
| 562 | } |
| 563 | return NULL; |
| 564 | } |
| 565 | |
| 566 | DirectoryRef MountSystem::openDirectory(const Path& path) |
| 567 | { |
no test coverage detected