MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / openFile

Method openFile

Engine/source/core/volume.cpp:536–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536FileRef 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
566DirectoryRef MountSystem::openDirectory(const Path& path)
567{

Callers 7

parseFileMethod · 0.45
OpenFileFunction · 0.45
handleCommandLineMethod · 0.45

Calls 2

getPointerMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected