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

Method openFile

Engine/source/core/volume.cpp:693–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693FileRef MountSystem::openFile(const Path& path,File::AccessMode mode)
694{
695 FileNodeRef node = getFileNode(path);
696 if (node != NULL)
697 {
698 FileRef file = dynamic_cast<File*>(node.getPointer());
699 if (file != NULL)
700 {
701 if (file->open(mode))
702 return file;
703 else
704 return NULL;
705 }
706 }
707 else
708 {
709 if (mode != File::Read)
710 {
711 FileRef file = createFile(path);
712
713 if (file != NULL)
714 {
715 file->open(mode);
716 return file;
717 }
718 }
719 }
720 return NULL;
721}
722
723DirectoryRef MountSystem::openDirectory(const Path& path)
724{

Callers 3

parseFileMethod · 0.45
OpenFileFunction · 0.45
handleCommandLineMethod · 0.45

Calls 2

openMethod · 0.65
getPointerMethod · 0.45

Tested by

no test coverage detected