Lines Matching refs:filePath
33 std::string ReadJsonFile(const std::string &filePath) in ReadJsonFile() argument
35 if (filePath.empty()) { in ReadJsonFile()
40 if (realpath(filePath.c_str(), realPath) == nullptr) { in ReadJsonFile()
52 if (!IsFileExists(filePath)) { in ReadJsonFile()
56 if (!CheckFileSize(filePath)) { in ReadJsonFile()
63 int32_t GetFileSize(const std::string& filePath) in GetFileSize() argument
66 if (stat(filePath.c_str(), &statbuf) != 0) { in GetFileSize()
73 bool CheckFileDir(const std::string& filePath, const std::string& dir) in CheckFileDir() argument
75 if (filePath.compare(0, CONFIG_DIR.size(), CONFIG_DIR) != 0) { in CheckFileDir()
82 bool CheckFileSize(const std::string& filePath) in CheckFileSize() argument
84 int32_t fileSize = GetFileSize(filePath); in CheckFileSize()
92 bool CheckFileExtendName(const std::string& filePath, const std::string& checkExtension) in CheckFileExtendName() argument
94 std::string::size_type pos = filePath.find_last_of('.'); in CheckFileExtendName()
99 return (filePath.substr(pos + 1, filePath.npos) == checkExtension); in CheckFileExtendName()
107 std::string ReadFile(const std::string &filePath) in ReadFile() argument
109 FILE* fp = fopen(filePath.c_str(), "r"); in ReadFile()