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

Method isDirectory

Engine/source/platformPOSIX/POSIXFileio.cpp:1027–1042  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1025
1026//-----------------------------------------------------------------------------
1027bool Platform::isDirectory(const char *pDirPath)
1028{
1029 if (!pDirPath || !*pDirPath)
1030 return false;
1031
1032 // Get file info
1033 struct stat fStat;
1034 if (stat(pDirPath, &fStat) < 0)
1035 return false;
1036
1037 // if the file is a Directory then true
1038 if ( (fStat.st_mode & S_IFMT) == S_IFDIR)
1039 return true;
1040
1041 return false;
1042}
1043
1044//-----------------------------------------------------------------------------
1045bool Platform::isSubDirectory(const char *pParent, const char *pDir)

Callers

nothing calls this directly

Calls 1

statClass · 0.70

Tested by

no test coverage detected