150 _M_path.replace_filename(__p);
157 _M_path.replace_filename(__p);
163 { _M_type = symlink_status().type(); }
167 { _M_type = symlink_status(__ec).type(); }
175 {
return filesystem::exists(
file_status{_M_file_type()}); }
179 {
return filesystem::exists(
file_status{_M_file_type(__ec)}); }
182 is_block_file()
const
183 {
return _M_file_type() == file_type::block; }
186 is_block_file(
error_code& __ec)
const noexcept
187 {
return _M_file_type(__ec) == file_type::block; }
190 is_character_file()
const
191 {
return _M_file_type() == file_type::character; }
194 is_character_file(
error_code& __ec)
const noexcept
195 {
return _M_file_type(__ec) == file_type::character; }
199 {
return _M_file_type() == file_type::directory; }
203 {
return _M_file_type(__ec) == file_type::directory; }
207 {
return _M_file_type() == file_type::fifo; }
211 {
return _M_file_type(__ec) == file_type::fifo; }
215 {
return filesystem::is_other(
file_status{_M_file_type()}); }
219 {
return filesystem::is_other(
file_status{_M_file_type(__ec)}); }
222 is_regular_file()
const
223 {
return _M_file_type() == file_type::regular; }
226 is_regular_file(
error_code& __ec)
const noexcept
227 {
return _M_file_type(__ec) == file_type::regular; }
231 {
return _M_file_type() == file_type::socket; }
235 {
return _M_file_type(__ec) == file_type::socket; }
240 if (_M_type != file_type::none)
241 return _M_type == file_type::symlink;
242 return symlink_status().type() == file_type::symlink;
248 if (_M_type != file_type::none)
249 return _M_type == file_type::symlink;
250 return symlink_status(__ec).type() == file_type::symlink;
255 {
return filesystem::file_size(_M_path); }
259 {
return filesystem::file_size(_M_path, __ec); }
262 hard_link_count()
const
263 {
return filesystem::hard_link_count(_M_path); }
266 hard_link_count(
error_code& __ec)
const noexcept
267 {
return filesystem::hard_link_count(_M_path, __ec); }
270 last_write_time()
const
271 {
return filesystem::last_write_time(_M_path); }
275 last_write_time(
error_code& __ec)
const noexcept
276 {
return filesystem::last_write_time(_M_path, __ec); }
280 {
return filesystem::status(_M_path); }
284 {
return filesystem::status(_M_path, __ec); }
287 symlink_status()
const
288 {
return filesystem::symlink_status(_M_path); }
291 symlink_status(
error_code& __ec)
const noexcept
292 {
return filesystem::symlink_status(_M_path, __ec); }
296 {
return _M_path == __rhs._M_path; }
298#if __cpp_lib_three_way_comparison
301 {
return _M_path <=> __rhs._M_path; }
305 {
return _M_path != __rhs._M_path; }
309 {
return _M_path < __rhs._M_path; }
313 {
return _M_path <= __rhs._M_path; }
317 {
return _M_path > __rhs._M_path; }
321 {
return _M_path >= __rhs._M_path; }
331 template<
typename _CharT,
typename _Traits>
335 {
return __os << __d.path(); }
338 : _M_path(__p), _M_type(__t)
345 if (_M_type != file_type::none && _M_type != file_type::symlink)
347 return status().type();
354 if (_M_type != file_type::none && _M_type != file_type::symlink)
359 return status(__ec).type();
399 typedef ptrdiff_t difference_type;
437 __directory_iterator_proxy operator++(
int)
439 __directory_iterator_proxy __pr{**
this};
448 return !__rhs._M_dir.owner_before(__lhs._M_dir)
449 && !__lhs._M_dir.owner_before(__rhs._M_dir);
452#if __cplusplus >= 202002L
459#if __cpp_impl_three_way_comparison < 201907L
463 {
return !(__lhs == __rhs); }
471 std::__shared_ptr<_Dir> _M_dir;
503 typedef ptrdiff_t difference_type;
533 int depth()
const noexcept;
534 bool recursion_pending()
const noexcept;
548 __directory_iterator_proxy operator++(
int)
550 __directory_iterator_proxy __pr{**
this};
558 void disable_recursion_pending()
noexcept;
564 return !__rhs._M_dirs.owner_before(__lhs._M_dirs)
565 && !__lhs._M_dirs.owner_before(__rhs._M_dirs);
568#if __cplusplus >= 202002L
575#if __cpp_impl_three_way_comparison < 201907L
579 {
return !(__lhs == __rhs); }
586 std::__shared_ptr<_Dir_stack> _M_dirs;
594 filesystem::remove_all(
const path&);