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

Method InstallFileSystems

Engine/source/platformPOSIX/posixVolume.cpp:578–598  ·  view source on GitHub ↗

Function invoked by the kernel layer to install OS specific file systems.

Source from the content-addressed store, hash-verified

576/// Function invoked by the kernel layer to install OS specific
577/// file systems.
578bool Platform::FS::InstallFileSystems()
579{
580 Platform::FS::Mount( "/", Platform::FS::createNativeFS( String() ) );
581
582 // Setup the current working dir.
583 char buffer[PATH_MAX];
584 if (::getcwd(buffer,sizeof(buffer)))
585 {
586 // add trailing '/' if it isn't there
587 if (buffer[dStrlen(buffer) - 1] != '/')
588 dStrcat(buffer, "/");
589
590 Platform::FS::SetCwd(buffer);
591 }
592
593 // Mount the home directory
594 if (char* home = getenv("HOME"))
595 Platform::FS::Mount( "home", Platform::FS::createNativeFS(home) );
596
597 return true;
598}

Callers

nothing calls this directly

Calls 5

MountFunction · 0.85
dStrcatFunction · 0.85
SetCwdFunction · 0.85
StringClass · 0.50
dStrlenFunction · 0.50

Tested by

no test coverage detected