| 1631 | } |
| 1632 | |
| 1633 | bool Content::isFileExist(String filename) { |
| 1634 | if (filename.empty()) { |
| 1635 | return false; |
| 1636 | } |
| 1637 | if (isAndroidAsset(filename)) { |
| 1638 | if (_apkFile->fileExists(getAndroidAssetName(filename))) { |
| 1639 | return true; |
| 1640 | } |
| 1641 | } else if (!isAbsolutePath(filename) && _apkFile->fileExists("assets/"s + filename)) { |
| 1642 | return true; |
| 1643 | } |
| 1644 | bool found = false; |
| 1645 | FILE* file = fopen(filename.c_str(), "r"); |
| 1646 | if (file) { |
| 1647 | found = true; |
| 1648 | fclose(file); |
| 1649 | } |
| 1650 | return found; |
| 1651 | } |
| 1652 | |
| 1653 | bool Content::isPathFolder(String path) { |
| 1654 | if (isAndroidAsset(path)) { |