Lines Matching refs:ec
65 static path __do_absolute(const path& p, path* cwd, error_code* ec) { in __do_absolute() argument
66 if (ec) in __do_absolute()
67 ec->clear(); in __do_absolute()
70 *cwd = __current_path(ec); in __do_absolute()
71 if (ec && *ec) in __do_absolute()
76 path __absolute(const path& p, error_code* ec) { in __absolute() argument
78 return __do_absolute(p, &cwd, ec); in __absolute()
81 path __canonical(path const& orig_p, error_code* ec) { in __canonical() argument
83 ErrorHandler<path> err("canonical", ec, &orig_p, &cwd); in __canonical()
85 path p = __do_absolute(orig_p, &cwd, ec); in __canonical()
104 void __copy(const path& from, const path& to, copy_options options, error_code* ec) { in __copy() argument
105 ErrorHandler<void> err("copy", ec, &from, &to); in __copy()
129 if (ec) in __copy()
130 ec->clear(); in __copy()
136 __copy_symlink(from, to, ec); in __copy()
145 __create_symlink(from, to, ec); in __copy()
147 __create_hard_link(from, to, ec); in __copy()
149 __copy_file(from, to / from.filename(), options, ec); in __copy()
151 __copy_file(from, to, options, ec); in __copy()
159 __create_directory(to, from, ec); in __copy()
160 if (ec && *ec) { in __copy()
164 directory_iterator it = ec ? directory_iterator(from, *ec) : directory_iterator(from); in __copy()
165 if (ec && *ec) { in __copy()
173 … __copy(it->path(), to / it->path().filename(), options | copy_options::__in_recursive_copy, ec); in __copy()
174 if (ec && *ec) { in __copy()
185 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) { in copy_file_impl() argument
190 ec = capture_errno(); in copy_file_impl()
196 ec.clear(); in copy_file_impl()
201 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
214 ec = capture_errno();
218 ec.clear();
222 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
227 ec = capture_errno();
234 ec = capture_errno();
248 ec = make_error_code(errc::io_error);
252 ec.clear();
262 bool __copy_file(const path& from, const path& to, copy_options options, error_code* ec) { in __copy_file() argument
264 ErrorHandler<bool> err("copy_file", ec, &to, &from); in __copy_file()
346 void __copy_symlink(const path& existing_symlink, const path& new_symlink, error_code* ec) { in __copy_symlink() argument
347 const path real_path(__read_symlink(existing_symlink, ec)); in __copy_symlink()
348 if (ec && *ec) { in __copy_symlink()
354 __create_directory_symlink(real_path, new_symlink, ec); in __copy_symlink()
357 __create_symlink(real_path, new_symlink, ec); in __copy_symlink()
360 bool __create_directories(const path& p, error_code* ec) { in __create_directories() argument
361 ErrorHandler<bool> err("create_directories", ec, &p); in __create_directories()
380 __create_directories(parent, ec); in __create_directories()
381 if (ec && *ec) { in __create_directories()
393 bool __create_directory(const path& p, error_code* ec) { in __create_directory() argument
394 ErrorHandler<bool> err("create_directory", ec, &p); in __create_directory()
409 bool __create_directory(path const& p, path const& attributes, error_code* ec) { in __create_directory() argument
410 ErrorHandler<bool> err("create_directory", ec, &p, &attributes); in __create_directory()
434 void __create_directory_symlink(path const& from, path const& to, error_code* ec) { in __create_directory_symlink() argument
435 ErrorHandler<void> err("create_directory_symlink", ec, &from, &to); in __create_directory_symlink()
440 void __create_hard_link(const path& from, const path& to, error_code* ec) { in __create_hard_link() argument
441 ErrorHandler<void> err("create_hard_link", ec, &from, &to); in __create_hard_link()
446 void __create_symlink(path const& from, path const& to, error_code* ec) { in __create_symlink() argument
447 ErrorHandler<void> err("create_symlink", ec, &from, &to); in __create_symlink()
452 path __current_path(error_code* ec) { in __current_path() argument
453 ErrorHandler<path> err("current_path", ec); in __current_path()
497 void __current_path(const path& p, error_code* ec) { in __current_path() argument
498 ErrorHandler<void> err("current_path", ec, &p); in __current_path()
503 bool __equivalent(const path& p1, const path& p2, error_code* ec) { in __equivalent() argument
504 ErrorHandler<bool> err("equivalent", ec, &p1, &p2); in __equivalent()
518 uintmax_t __file_size(const path& p, error_code* ec) { in __file_size() argument
519 ErrorHandler<uintmax_t> err("file_size", ec, &p); in __file_size()
534 uintmax_t __hard_link_count(const path& p, error_code* ec) { in __hard_link_count() argument
535 ErrorHandler<uintmax_t> err("hard_link_count", ec, &p); in __hard_link_count()
545 bool __fs_is_empty(const path& p, error_code* ec) { in __fs_is_empty() argument
546 ErrorHandler<bool> err("is_empty", ec, &p); in __fs_is_empty()
556 auto it = ec ? directory_iterator(p, *ec) : directory_iterator(p); in __fs_is_empty()
557 if (ec && *ec) in __fs_is_empty()
566 file_time_type __last_write_time(const path& p, error_code* ec) { in __last_write_time() argument
568 ErrorHandler<file_time_type> err("last_write_time", ec, &p); in __last_write_time()
575 return detail::__extract_last_write_time(p, st, ec); in __last_write_time()
578 void __last_write_time(const path& p, file_time_type new_time, error_code* ec) { in __last_write_time() argument
580 ErrorHandler<void> err("last_write_time", ec, &p); in __last_write_time()
617 void __permissions(const path& p, perms prms, perm_options opts, error_code* ec) { in __permissions() argument
618 ErrorHandler<void> err("permissions", ec, &p); in __permissions()
660 path __read_symlink(const path& p, error_code* ec) { in __read_symlink() argument
661 ErrorHandler<path> err("read_symlink", ec, &p); in __read_symlink()
692 bool __remove(const path& p, error_code* ec) { in __remove() argument
693 ErrorHandler<bool> err("remove", ec, &p); in __remove()
717 uintmax_t remove_all_impl(path const& p, error_code& ec) { in remove_all_impl() argument
719 const file_status st = __symlink_status(p, &ec); in remove_all_impl()
720 if (ec) in remove_all_impl()
724 for (directory_iterator it(p, ec); !ec && it != directory_iterator(); it.increment(ec)) { in remove_all_impl()
725 auto other_count = remove_all_impl(it->path(), ec); in remove_all_impl()
726 if (ec) in remove_all_impl()
730 if (ec) in remove_all_impl()
733 if (!__remove(p, &ec)) in remove_all_impl()
740 uintmax_t __remove_all(const path& p, error_code* ec) { in __remove_all() argument
741 ErrorHandler<uintmax_t> err("remove_all", ec, &p); in __remove_all()
768 uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) { in remove_all_impl() argument
778 ec = detail::capture_errno(); in remove_all_impl()
787 auto [str, type] = detail::posix_readdir(stream, ec); in remove_all_impl()
791 } else if (ec || str.empty()) { in remove_all_impl()
794 count += remove_all_impl(fd, str, ec); in remove_all_impl()
800 ec = detail::capture_errno(); in remove_all_impl()
807 ec = detail::capture_errno(); in remove_all_impl()
811 if (ec == errc::no_such_file_or_directory) { in remove_all_impl()
812 ec.clear(); in remove_all_impl()
820 …if (ec == errc::not_a_directory || ec == errc::too_many_symbolic_link_levels || ec == errc::too_ma… in remove_all_impl()
821 ec.clear(); in remove_all_impl()
823 ec = detail::capture_errno(); in remove_all_impl()
835 uintmax_t __remove_all(const path& p, error_code* ec) { in __remove_all() argument
836 ErrorHandler<uintmax_t> err("remove_all", ec, &p); in __remove_all()
846 void __rename(const path& from, const path& to, error_code* ec) { in __rename() argument
847 ErrorHandler<void> err("rename", ec, &from, &to); in __rename()
852 void __resize_file(const path& p, uintmax_t size, error_code* ec) { in __resize_file() argument
853 ErrorHandler<void> err("resize_file", ec, &p); in __resize_file()
858 space_info __space(const path& p, error_code* ec) { in __space() argument
859 ErrorHandler<void> err("space", ec, &p); in __space()
879 file_status __status(const path& p, error_code* ec) { return detail::posix_stat(p, ec); } in __status() argument
881 file_status __symlink_status(const path& p, error_code* ec) { return detail::posix_lstat(p, ec); } in __symlink_status() argument
883 path __temp_directory_path(error_code* ec) { in __temp_directory_path() argument
884 ErrorHandler<path> err("temp_directory_path", ec); in __temp_directory_path()
926 path __weakly_canonical(const path& p, error_code* ec) { in __weakly_canonical() argument
927 ErrorHandler<path> err("weakly_canonical", ec, &p); in __weakly_canonical()
930 return __canonical("", ec); in __weakly_canonical()
946 result = __canonical(tmp, ec); in __weakly_canonical()
953 result = __canonical("", ec); in __weakly_canonical()
954 if (ec) in __weakly_canonical()
955 ec->clear(); in __weakly_canonical()