Lines Matching defs:fileName
49 std::string GetFilePath(const std::string &fileName)
51 std::size_t pos = fileName.find_last_of('/');
53 pos = fileName.find_last_of('\\');
55 return fileName.substr(0, pos + 1);
58 size_t GetFileSize(const std::string &fileName)
62 if (_fullpath(realPath, fileName.c_str(), PATH_MAX) == nullptr) {
64 if (realpath(fileName.c_str(), realPath) == nullptr) {
71 PKG_LOGE("Invalid file %s", fileName.c_str());
137 int32_t CheckFile(const std::string &fileName, int type)
139 // Check if the directory of @fileName is exist or has write permission
141 std::string path = GetFilePath(fileName);
155 PKG_LOGE("file %s no permission ", fileName.c_str());
161 uint8_t *AnonymousMap(const std::string &fileName, size_t size)
167 PKG_LOGE("Failed to alloc memory for file %s ", fileName.c_str());