Lines Matching refs:filePath
86 std::string DeviceStatusDataParse::ReadJsonFile(const std::string &filePath) in ReadJsonFile() argument
88 if (filePath.empty()) { in ReadJsonFile()
93 if (realpath(filePath.c_str(), realPath) == nullptr) { in ReadJsonFile()
105 if (!IsFileExists(filePath)) { in ReadJsonFile()
109 if (CheckFileSize(filePath) == INVALID_FILE_SIZE) { in ReadJsonFile()
116 int32_t DeviceStatusDataParse::GetFileSize(const std::string& filePath) in GetFileSize() argument
119 if (stat(filePath.c_str(), &statbuf) != 0) { in GetFileSize()
126 bool DeviceStatusDataParse::CheckFileDir(const std::string& filePath, const std::string& dir) in CheckFileDir() argument
128 if (filePath.compare(0, MSDP_DATA_DIR.size(), MSDP_DATA_DIR) != 0) { in CheckFileDir()
135 int32_t DeviceStatusDataParse::CheckFileSize(const std::string& filePath) in CheckFileSize() argument
137 int32_t fileSize = GetFileSize(filePath); in CheckFileSize()
145 bool DeviceStatusDataParse::CheckFileExtendName(const std::string& filePath, const std::string& che… in CheckFileExtendName() argument
147 std::string::size_type pos = filePath.find_last_of('.'); in CheckFileExtendName()
152 return (filePath.substr(pos + 1, filePath.npos) == checkExtension); in CheckFileExtendName()
160 std::string DeviceStatusDataParse::ReadFile(const std::string &filePath) in ReadFile() argument
163 FILE* fp = fopen(filePath.c_str(), "r"); in ReadFile()