Lines Matching defs:path
96 int32_t CreatDirectory(const std::string &path, mode_t mode)
101 slashPos = path.find_first_of("/", slashPos);
110 PKG_LOGE("path too long");
113 auto subDir = path.substr(0, slashPos);
127 int ret = mkdir(path.c_str());
129 int ret = mkdir(path.c_str(), mode);
141 std::string path = GetFilePath(fileName);
142 if (path.empty()) {
145 if (access(path.c_str(), F_OK) == -1) {
146 CreatDirectory(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
150 ret = access(path.c_str(), R_OK);
152 ret = access(path.c_str(), R_OK | W_OK);
173 uint8_t *FileMap(const std::string &path)
175 if (access(path.c_str(), 0) != 0) {
176 PKG_LOGE("Path not exist %s", path.c_str());
179 int fd = open(path.c_str(), O_RDONLY);
184 size_t size = GetFileSize(path);
208 std::string path;
214 path.assign(buffer);
216 return path + "/";