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

Method isFile

Engine/source/platformPOSIX/POSIXFileio.cpp:991–1008  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

989
990//-----------------------------------------------------------------------------
991bool Platform::isFile(const char *pFilePath)
992{
993 if (!pFilePath || !*pFilePath)
994 return false;
995 // Get file info
996 struct stat fStat;
997 if (stat(pFilePath, &fStat) < 0)
998 {
999 // Since file does not exist on disk see if it exists in a zip file loaded
1000 return Torque::FS::IsFile(pFilePath);
1001 }
1002
1003 // if the file is a "regular file" then true
1004 if ( (fStat.st_mode & S_IFMT) == S_IFREG)
1005 return true;
1006 // must be some other file (directory, device, etc.)
1007 return false;
1008}
1009
1010//-----------------------------------------------------------------------------
1011S32 Platform::getFileSize(const char *pFilePath)

Callers

nothing calls this directly

Calls 2

IsFileFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected