Lines Matching refs:path
88 void Utility::RemoveTrailingChars(char c, char *path)
90 CHKPV(path);
91 size_t len = strlen(path);
92 while (len > 0 && path[len-1] == c) {
93 path[--len] = '\0';
97 void Utility::RemoveTrailingChars(const std::string &toRemoved, std::string &path)
99 while (!path.empty() && (toRemoved.find(path.back()) != std::string::npos)) {
100 path.pop_back();
128 bool Utility::DoesFileExist(const char *path)
130 return (access(path, F_OK) == 0);
138 ssize_t Utility::GetFileSize(const char *path)
143 if (stat(path, &buf) == 0) {
147 FI_HILOGE("Not regular file:\'%{public}s\'", path);
150 FI_HILOGE("stat(\'%{public}s\') failed:%{public}s", path, strerror(errno));
155 void Utility::ShowFileAttributes(const char *path)
159 FI_HILOGD("%{public}20s:%{public}s", "FILE NAME", path);
162 if (stat(path, &buf) != 0) {
163 FI_HILOGE("stat(\'%{public}s\') failed:%{public}s", path, strerror(errno));