-----------------------------------------------------------------------------
| 827 | |
| 828 | //----------------------------------------------------------------------------- |
| 829 | bool 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 | //----------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected