Lines Matching defs:ec
65 static path __do_absolute(const path& p, path* cwd, error_code* ec) {
66 if (ec)
67 ec->clear();
70 *cwd = __current_path(ec);
71 if (ec && *ec)
76 path __absolute(const path& p, error_code* ec) {
78 return __do_absolute(p, &cwd, ec);
81 path __canonical(path const& orig_p, error_code* ec) {
83 ErrorHandler<path> err("canonical", ec, &orig_p, &cwd);
85 path p = __do_absolute(orig_p, &cwd, ec);
104 void __copy(const path& from, const path& to, copy_options options, error_code* ec) {
105 ErrorHandler<void> err("copy", ec, &from, &to);
133 __copy_symlink(from, to, ec);
142 __create_symlink(from, to, ec);
144 __create_hard_link(from, to, ec);
146 __copy_file(from, to / from.filename(), options, ec);
148 __copy_file(from, to, options, ec);
156 __create_directory(to, from, ec);
157 if (ec && *ec) {
161 directory_iterator it = ec ? directory_iterator(from, *ec) : directory_iterator(from);
162 if (ec && *ec) {
167 __copy(it->path(), to / it->path().filename(), options | copy_options::__in_recursive_copy, ec);
168 if (ec && *ec) {
182 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
187 ec = capture_errno();
193 ec.clear();
198 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
211 ec = capture_errno();
215 ec.clear();
219 bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
224 ec = capture_errno();
231 ec = capture_errno();
245 ec = make_error_code(errc::io_error);
249 ec.clear();
259 bool __copy_file(const path& from, const path& to, copy_options options, error_code* ec) {
261 ErrorHandler<bool> err("copy_file", ec, &to, &from);
343 void __copy_symlink(const path& existing_symlink, const path& new_symlink, error_code* ec) {
344 const path real_path(__read_symlink(existing_symlink, ec));
345 if (ec && *ec) {
351 __create_directory_symlink(real_path, new_symlink, ec);
354 __create_symlink(real_path, new_symlink, ec);
357 bool __create_directories(const path& p, error_code* ec) {
358 ErrorHandler<bool> err("create_directories", ec, &p);
377 __create_directories(parent, ec);
378 if (ec && *ec) {
390 bool __create_directory(const path& p, error_code* ec) {
391 ErrorHandler<bool> err("create_directory", ec, &p);
406 bool __create_directory(path const& p, path const& attributes, error_code* ec) {
407 ErrorHandler<bool> err("create_directory", ec, &p, &attributes);
431 void __create_directory_symlink(path const& from, path const& to, error_code* ec) {
432 ErrorHandler<void> err("create_directory_symlink", ec, &from, &to);
437 void __create_hard_link(const path& from, const path& to, error_code* ec) {
438 ErrorHandler<void> err("create_hard_link", ec, &from, &to);
443 void __create_symlink(path const& from, path const& to, error_code* ec) {
444 ErrorHandler<void> err("create_symlink", ec, &from, &to);
449 path __current_path(error_code* ec) {
450 ErrorHandler<path> err("current_path", ec);
494 void __current_path(const path& p, error_code* ec) {
495 ErrorHandler<void> err("current_path", ec, &p);
500 bool __equivalent(const path& p1, const path& p2, error_code* ec) {
501 ErrorHandler<bool> err("equivalent", ec, &p1, &p2);
515 uintmax_t __file_size(const path& p, error_code* ec) {
516 ErrorHandler<uintmax_t> err("file_size", ec, &p);
531 uintmax_t __hard_link_count(const path& p, error_code* ec) {
532 ErrorHandler<uintmax_t> err("hard_link_count", ec, &p);
542 bool __fs_is_empty(const path& p, error_code* ec) {
543 ErrorHandler<bool> err("is_empty", ec, &p);
553 auto it = ec ? directory_iterator(p, *ec) : directory_iterator(p);
554 if (ec && *ec)
563 file_time_type __last_write_time(const path& p, error_code* ec) {
565 ErrorHandler<file_time_type> err("last_write_time", ec, &p);
572 return detail::__extract_last_write_time(p, st, ec);
575 void __last_write_time(const path& p, file_time_type new_time, error_code* ec) {
577 ErrorHandler<void> err("last_write_time", ec, &p);
614 void __permissions(const path& p, perms prms, perm_options opts, error_code* ec) {
615 ErrorHandler<void> err("permissions", ec, &p);
657 path __read_symlink(const path& p, error_code* ec) {
658 ErrorHandler<path> err("read_symlink", ec, &p);
689 bool __remove(const path& p, error_code* ec) {
690 ErrorHandler<bool> err("remove", ec, &p);
714 uintmax_t remove_all_impl(path const& p, error_code& ec) {
716 const file_status st = __symlink_status(p, &ec);
717 if (ec)
721 for (directory_iterator it(p, ec); !ec && it != directory_iterator(); it.increment(ec)) {
722 auto other_count = remove_all_impl(it->path(), ec);
723 if (ec)
727 if (ec)
730 if (!__remove(p, &ec))
737 uintmax_t __remove_all(const path& p, error_code* ec) {
738 ErrorHandler<uintmax_t> err("remove_all", ec, &p);
765 uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) {
775 ec = detail::capture_errno();
784 auto [str, type] = detail::posix_readdir(stream, ec);
788 } else if (ec || str.empty()) {
791 count += remove_all_impl(fd, str, ec);
797 ec = detail::capture_errno();
804 ec = detail::capture_errno();
808 if (ec == errc::no_such_file_or_directory) {
809 ec.clear();
817 if (ec == errc::not_a_directory || ec == errc::too_many_symbolic_link_levels || ec == errc::too_many_links) {
818 ec.clear();
820 ec = detail::capture_errno();
832 uintmax_t __remove_all(const path& p, error_code* ec) {
833 ErrorHandler<uintmax_t> err("remove_all", ec, &p);
843 void __rename(const path& from, const path& to, error_code* ec) {
844 ErrorHandler<void> err("rename", ec, &from, &to);
849 void __resize_file(const path& p, uintmax_t size, error_code* ec) {
850 ErrorHandler<void> err("resize_file", ec, &p);
855 space_info __space(const path& p, error_code* ec) {
856 ErrorHandler<void> err("space", ec, &p);
876 file_status __status(const path& p, error_code* ec) { return detail::posix_stat(p, ec); }
878 file_status __symlink_status(const path& p, error_code* ec) { return detail::posix_lstat(p, ec); }
880 path __temp_directory_path(error_code* ec) {
881 ErrorHandler<path> err("temp_directory_path", ec);
923 path __weakly_canonical(const path& p, error_code* ec) {
924 ErrorHandler<path> err("weakly_canonical", ec, &p);
927 return __canonical("", ec);