Lines Matching refs:path
111 llvm::ErrorOr<vfs::Status> FileSystem::GetStatus(const Twine &path) const { in GetStatus()
112 return m_fs->status(path); in GetStatus()
122 sys::TimePoint<> FileSystem::GetModificationTime(const Twine &path) const { in GetModificationTime()
123 ErrorOr<vfs::Status> status = m_fs->status(path); in GetModificationTime()
135 uint64_t FileSystem::GetByteSize(const Twine &path) const { in GetByteSize()
136 ErrorOr<vfs::Status> status = m_fs->status(path); in GetByteSize()
153 uint32_t FileSystem::GetPermissions(const Twine &path) const { in GetPermissions()
155 return GetPermissions(path, ec); in GetPermissions()
158 uint32_t FileSystem::GetPermissions(const Twine &path, in GetPermissions() argument
160 ErrorOr<vfs::Status> status = m_fs->status(path); in GetPermissions()
168 bool FileSystem::Exists(const Twine &path) const { return m_fs->exists(path); } in Exists()
174 bool FileSystem::Readable(const Twine &path) const { in Readable()
175 return GetPermissions(path) & sys::fs::perms::all_read; in Readable()
182 bool FileSystem::IsDirectory(const Twine &path) const { in IsDirectory()
183 ErrorOr<vfs::Status> status = m_fs->status(path); in IsDirectory()
193 bool FileSystem::IsLocal(const Twine &path) const { in IsLocal()
195 m_fs->isLocal(path, b); in IsLocal()
203 void FileSystem::EnumerateDirectory(Twine path, bool find_directories, in EnumerateDirectory() argument
208 vfs::recursive_directory_iterator Iter(*m_fs, path, EC); in EnumerateDirectory()
212 ErrorOr<vfs::Status> Status = m_fs->status(Item.path()); in EnumerateDirectory()
222 auto Result = callback(callback_baton, Status->getType(), Item.path()); in EnumerateDirectory()
233 std::error_code FileSystem::MakeAbsolute(SmallVectorImpl<char> &path) const { in MakeAbsolute()
234 return m_fs->makeAbsolute(path); in MakeAbsolute()
238 SmallString<128> path; in MakeAbsolute() local
239 file_spec.GetPath(path, false); in MakeAbsolute()
241 auto EC = MakeAbsolute(path); in MakeAbsolute()
245 FileSpec new_file_spec(path, file_spec.GetPathStyle()); in MakeAbsolute()
250 std::error_code FileSystem::GetRealPath(const Twine &path, in GetRealPath() argument
252 return m_fs->getRealPath(path, output); in GetRealPath()
255 void FileSystem::Resolve(SmallVectorImpl<char> &path) { in Resolve() argument
256 if (path.empty()) in Resolve()
260 SmallString<128> resolved(path.begin(), path.end()); in Resolve()
262 Resolver.ResolveFullPath(llvm::StringRef(path.begin(), path.size()), in Resolve()
269 path.clear(); in Resolve()
271 path.append(absolute.begin(), absolute.end()); in Resolve()
273 path.append(resolved.begin(), resolved.end()); in Resolve()
282 SmallString<128> path; in Resolve() local
283 file_spec.GetPath(path); in Resolve()
286 Resolve(path); in Resolve()
290 file_spec.GetDirectory().SetString(path); in Resolve()
292 file_spec.SetPath(path); in Resolve()
297 FileSystem::CreateDataBuffer(const llvm::Twine &path, uint64_t size, in CreateDataBuffer() argument
299 Collect(path); in CreateDataBuffer()
301 const bool is_volatile = !IsLocal(path); in CreateDataBuffer()
302 const ErrorOr<std::string> external_path = GetExternalPath(path); in CreateDataBuffer()
349 llvm::StringRef path = *error_or_path; in ResolveExecutableLocation() local
350 llvm::StringRef parent = llvm::sys::path::parent_path(path); in ResolveExecutableLocation()
363 bool FileSystem::GetHomeDirectory(SmallVectorImpl<char> &path) const { in GetHomeDirectory()
365 path.assign(m_home_directory.begin(), m_home_directory.end()); in GetHomeDirectory()
368 return llvm::sys::path::home_directory(path); in GetHomeDirectory()
379 static int OpenWithFS(const FileSystem &fs, const char *path, int flags, in OpenWithFS() argument
381 return const_cast<FileSystem &>(fs).Open(path, flags, mode); in OpenWithFS()
459 auto path = GetExternalPath(file_spec); in Open() local
460 if (!path) in Open()
461 return errorCodeToError(path.getError()); in Open()
464 -1, OpenWithFS, *this, path->c_str(), open_flags, open_mode); in Open()
476 ErrorOr<std::string> FileSystem::GetExternalPath(const llvm::Twine &path) { in GetExternalPath() argument
478 return path.str(); in GetExternalPath()
482 static_cast<vfs::RedirectingFileSystem &>(*m_fs).lookupPath(path.str()); in GetExternalPath()
485 return path.str(); in GetExternalPath()