• Home
  • Raw
  • Download

Lines Matching refs:path

50 FileType GetFileType(const std::string& path) {  in GetFileType()  argument
52 if (!::android::base::UTF8PathToWindowsLongPath(path.c_str(), &path_utf16)) { in GetFileType()
69 FileType GetFileType(const std::string& path) {
71 int result = stat(path.c_str(), &sb);
104 bool mkdirs(const std::string& path) { in mkdirs() argument
109 if (util::StartsWith(path, R"(\\?\)")) { in mkdirs()
115 if (path.size() >= 3 && path[current_pos + 1] == ':' && in mkdirs()
116 (path[current_pos + 2] == '\\' || path[current_pos + 2] == '/')) { in mkdirs()
127 while ((current_pos = path.find(sDirSep, current_pos)) != std::string::npos) { in mkdirs()
128 std::string parent_path = path.substr(0, current_pos); in mkdirs()
139 return ::android::base::utf8::mkdir(path.c_str(), mode) == 0 || errno == EEXIST; in mkdirs()
142 StringPiece GetStem(const StringPiece& path) { in GetStem() argument
143 const char* start = path.begin(); in GetStem()
144 const char* end = path.end(); in GetStem()
153 StringPiece GetFilename(const StringPiece& path) { in GetFilename() argument
154 const char* end = path.end(); in GetFilename()
155 const char* last_dir_sep = path.begin(); in GetFilename()
156 for (const char* c = path.begin(); c != end; ++c) { in GetFilename()
164 StringPiece GetExtension(const StringPiece& path) { in GetExtension() argument
165 StringPiece filename = GetFilename(path); in GetExtension()
174 bool IsHidden(const android::StringPiece& path) { in IsHidden() argument
175 return util::StartsWith(GetFilename(path), "."); in IsHidden()
211 Maybe<FileMap> MmapPath(const std::string& path, std::string* out_error) { in MmapPath() argument
213 unique_fd fd(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), flags))); in MmapPath()
235 if (!filemap.create(path.c_str(), fd, 0, filestats.st_size, true)) { in MmapPath()
244 bool AppendArgsFromFile(const StringPiece& path, std::vector<std::string>* out_arglist, in AppendArgsFromFile() argument
247 if (!ReadFileToString(path.to_string(), &contents, true /*follow_symlinks*/)) { in AppendArgsFromFile()
263 bool AppendSetArgsFromFile(const StringPiece& path, std::unordered_set<std::string>* out_argset, in AppendSetArgsFromFile() argument
266 if(!ReadFileToString(path.to_string(), &contents, true /*follow_symlinks*/)) { in AppendSetArgsFromFile()
347 Maybe<std::vector<std::string>> FindFiles(const android::StringPiece& path, IDiagnostics* diag, in FindFiles() argument
349 const std::string root_dir = path.to_string(); in FindFiles()