MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / isFile

Method isFile

engine/source/platformEmscripten/EmscriptenFileio.cpp:913–927  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

911
912//-----------------------------------------------------------------------------
913bool Platform::isFile(const char *pFilePath)
914{
915 if (!pFilePath || !*pFilePath)
916 return false;
917 // Get file info
918 struct stat fStat;
919 if (stat(pFilePath, &fStat) < 0)
920 return false;
921
922 // if the file is a "regular file" then true
923 if ( (fStat.st_mode & S_IFMT) == S_IFREG)
924 return true;
925 // must be some other file (directory, device, etc.)
926 return false;
927}
928
929//-----------------------------------------------------------------------------
930S32 Platform::getFileSize(const char *pFilePath)

Callers

nothing calls this directly

Calls 1

statClass · 0.70

Tested by

no test coverage detected