diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-05-09 01:52:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-05-09 01:52:26 -0700 |
| commit | bcb534c295d5cc6fd63caa570cc08e6b148a507c (patch) | |
| tree | 0b17cb1e632d894f50f25e550d5113f232b0e877 /lib/libcxx/src/filesystem/directory_entry.cpp | |
| parent | d9b00ee4ba48717ff6b306a6f9419e7b604ac04b (diff) | |
| parent | 74f52954b9cb40d59d80b839b45bb859146731a7 (diff) | |
| download | zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.tar.gz zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.zip | |
Merge branch 'llvm18'
Upgrades the LLVM, Clang, and LLD dependencies to LLVM 18.x
Related to #16270
Diffstat (limited to 'lib/libcxx/src/filesystem/directory_entry.cpp')
| -rw-r--r-- | lib/libcxx/src/filesystem/directory_entry.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/libcxx/src/filesystem/directory_entry.cpp b/lib/libcxx/src/filesystem/directory_entry.cpp index 4910d390d1..1527152439 100644 --- a/lib/libcxx/src/filesystem/directory_entry.cpp +++ b/lib/libcxx/src/filesystem/directory_entry.cpp @@ -28,9 +28,9 @@ error_code directory_entry::__do_refresh() noexcept { return failure_ec; } - if (!_VSTD_FS::exists(st) || !_VSTD_FS::is_symlink(st)) { - __data_.__cache_type_ = directory_entry::_RefreshNonSymlink; - __data_.__type_ = st.type(); + if (!filesystem::exists(st) || !filesystem::is_symlink(st)) { + __data_.__cache_type_ = directory_entry::_RefreshNonSymlink; + __data_.__type_ = st.type(); __data_.__non_sym_perms_ = st.permissions(); } else { // we have a symlink __data_.__sym_perms_ = st.permissions(); @@ -40,7 +40,7 @@ error_code directory_entry::__do_refresh() noexcept { error_code ignored_ec; st = detail::posix_stat(__p_, full_st, &ignored_ec); - __data_.__type_ = st.type(); + __data_.__type_ = st.type(); __data_.__non_sym_perms_ = st.permissions(); // If we failed to resolve the link, then only partially populate the @@ -54,18 +54,17 @@ error_code directory_entry::__do_refresh() noexcept { __data_.__cache_type_ = directory_entry::_RefreshSymlink; } - if (_VSTD_FS::is_regular_file(st)) + if (filesystem::is_regular_file(st)) __data_.__size_ = static_cast<uintmax_t>(full_st.st_size); - if (_VSTD_FS::exists(st)) { + if (filesystem::exists(st)) { __data_.__nlink_ = static_cast<uintmax_t>(full_st.st_nlink); // Attempt to extract the mtime, and fail if it's not representable using // file_time_type. For now we ignore the error, as we'll report it when // the value is actually used. error_code ignored_ec; - __data_.__write_time_ = - detail::__extract_last_write_time(__p_, full_st, &ignored_ec); + __data_.__write_time_ = detail::__extract_last_write_time(__p_, full_st, &ignored_ec); } return failure_ec; |
