Lines Matching full:path
27 bool FileOperator::Create(const std::string &path, mode_t mode) in Create() argument
29 auto ret = mkdir(path.c_str(), mode); in Create()
31 IMSA_HILOGE("%{public}s mkdir failed, errno:%{public}d!", path.c_str(), errno); in Create()
37 bool FileOperator::IsExist(const std::string &path) in IsExist() argument
39 return access(path.c_str(), F_OK) == SUCCESS; in IsExist()
42 bool FileOperator::Read(const std::string &path, std::string &content) in Read() argument
44 std::ifstream file(path); in Read()
46 IMSA_HILOGE("%{public}s open fail!", path.c_str()); in Read()
56 bool FileOperator::Write(const std::string &path, const std::string &content, int32_t flags, mode_t… in Write() argument
59 auto fd = open(path.c_str(), flags, mode); in Write()
61 IMSA_HILOGE("%{public}s open fail, errno: %{public}d", path.c_str(), errno); in Write()
66 …IMSA_HILOGE("%{public}s write fail, ret: %{public}zd, errno: %{public}d", path.c_str(), ret, errno… in Write()
74 bool FileOperator::Read(const std::string &path, const std::string &key, std::string &content) in Read() argument
80 CfgFiles *cfgFiles = GetCfgFiles(path.c_str()); in Read()
82 IMSA_HILOGE("%{public}s cfgFiles is nullptr!", path.c_str()); in Read()
100 std::string FileOperator::Read(const std::string &path, const std::string &key) in Read() argument
103 bool ret = Read(path, content); in Read()
105 IMSA_HILOGE("%{public}s read failed!", path.c_str()); in Read()
109 IMSA_HILOGD("%{public}s not contain %{public}s!", path.c_str(), key.c_str()); in Read()
115 std::string FileOperator::GetRealPath(const char *path) in GetRealPath() argument
117 if (path == nullptr) { in GetRealPath()
120 auto size = strnlen(path, PATH_MAX); in GetRealPath()
125 if (realpath(path, realPath) == nullptr) { in GetRealPath()