std::filesystem::copy: copying filesystem objects
std::filesystem::copy copies a file, symlink, or directory according to the source type and copy_options bits, reporting errors by exception or error_code.
CKTIS / C++
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
std::filesystem::copy copies a file, symlink, or directory according to the source type and copy_options bits, reporting errors by exception or error_code.
std::filesystem::create_directories creates missing directories along a path in order and reports whether it created the final directory.
std::filesystem::directory_iterator is an input iterator over a directory’s immediate entries and does not descend into subdirectories automatically.
std::filesystem::exists returns true when a path status is known and is not file_type::not_found.
std::filesystem::file_size returns a uintmax_t regular-file size in bytes and reports an error for a missing path.
std::filesystem::path stores pathname syntax and elements but does not itself check whether a filesystem object exists or is valid.
std::filesystem::perms represents file permission bits. Combine flags with |, inspect them with &, and distinguish an empty permission set from unknown permissions.
std::filesystem::recursive_directory_iterator is a single-pass input iterator over entries in a directory and its subdirectories.
std::filesystem::remove removes one file or empty directory and reports whether an existing entry was actually removed.
std::filesystem::rename moves an entry from old_p to new_p with POSIX rename semantics and does not copy its contents.
std::filesystem::status reads the file_status of the object named by a path and follows symbolic links encountered during resolution.
std::fill assigns value to every element in the half-open iterator range [first, last) and returns void in C++23.
std::find searches [first, last) from the beginning and returns the first iterator for which *i == value, or last.
std::find_if returns the first iterator in [first, last) for which pred(*i) is not false, or last.
std::find_if_not returns the first iterator in [first, last) for which pred(*i) is false, or last.
std::fixed selects fixed-point formatting for floating-point values in a stream. Together with std::setprecision(n), it specifies the number of digits after the decimal separator, and the setting remains active for subsequent operations.
std::for_each invokes a function for every element in [first, last); the sequential form preserves order and returns the function object.
std::format creates a new std::string from a checked format pattern and its arguments.
std::format_error, declared in <format>, reports errors from the formatting library. Learn the distinction between a runtime exception and compile-time rejection of an invalid format string, and how to catch this exception safely.
A std::formatter<T, charT> specialization defines how a format specification is parsed and how a T value is written.
std::format_to writes formatted characters through an output iterator and returns the iterator past the last write.
std::forward<T> restores the value category recorded by forwarding-reference deduction.
std::forward_list stores a one-way chain and offers constant-time operations after a known predecessor.
std::from_chars parses a number in [first, last), returning the match end and an error code without exceptions.