MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / isFileExist

Method isFileExist

Source/Basic/Content.cpp:1633–1651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1631}
1632
1633bool 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
1653bool Content::isPathFolder(String path) {
1654 if (isAndroidAsset(path)) {

Callers 1

initMethod · 0.45

Calls 8

fopenFunction · 0.85
fcloseFunction · 0.85
existsFunction · 0.85
fileExistsMethod · 0.65
toStringMethod · 0.65
insertMethod · 0.65
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected