Lines Matching refs:filePath
38 std::string ReadJsonFile(const std::string &filePath) in ReadJsonFile() argument
40 if (filePath.empty()) { in ReadJsonFile()
45 if (realpath(filePath.c_str(), realPath) == nullptr) { in ReadJsonFile()
78 int32_t GetFileSize(const std::string &filePath) in GetFileSize() argument
81 if (stat(filePath.c_str(), &statbuf) != 0) { in GetFileSize()
109 char filePath[FILE_PATH_MAX] = {'\0'}; in GetFileName() local
117 ret = readlink(buf, filePath, FILE_PATH_MAX); in GetFileName()
123 fileName = filePath; in GetFileName()
148 bool CheckFileDir(const std::string &filePath, const std::string &dir) in CheckFileDir() argument
150 if (filePath.compare(0, CONFIG_DIR.size(), CONFIG_DIR) != 0) { in CheckFileDir()
157 bool CheckFileSize(const std::string &filePath) in CheckFileSize() argument
159 int32_t fileSize = GetFileSize(filePath); in CheckFileSize()
167 bool CheckFileExtendName(const std::string &filePath, const std::string &checkExtension) in CheckFileExtendName() argument
169 std::string::size_type pos = filePath.find_last_of('.'); in CheckFileExtendName()
174 return (filePath.substr(pos + 1, filePath.npos) == checkExtension); in CheckFileExtendName()
218 char filePath[FILE_PATH_MAX + 1] = { '\0' }; in GetFileSuffix() local
219 ssize_t ret = readlink(fdPath.c_str(), filePath, FILE_PATH_MAX); in GetFileSuffix()
224 std::string fileAbsolutePath(filePath); in GetFileSuffix()