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

Method isFile

engine/source/platformAndroid/AndroidFileio.cpp:829–855  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

827
828//-----------------------------------------------------------------------------
829bool Platform::isFile(const char *path)
830{
831 if (!path || !*path)
832 return false;
833
834 if (isCachePath(path) || isUserDataPath(path))
835 {
836 // make sure we can stat the file
837 struct stat statData;
838 if( stat(path, &statData) < 0 )
839 return false;
840
841 // now see if it's a regular file
842 if( (statData.st_mode & S_IFMT) == S_IFREG)
843 return true;
844
845 return false;
846 }
847
848 //Checking for . to avoid multiple JNI calls for performance.
849 if (strstr(path, ".") == NULL)
850 return false;
851
852 return true;
853
854 //return android_IsFile(path);
855}
856
857
858//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

isCachePathFunction · 0.85
isUserDataPathFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected