Copies entire hierarchies in the file system from one place to another. More...
#include <recursive_file_copy.h>
Public Types | |
| enum | outcomes { OKAY = basis::common::OKAY, BAD_INPUT = basis::common::BAD_INPUT, GARBAGE = basis::common::GARBAGE, NOT_FOUND = basis::common::NOT_FOUND, NONE_READY = basis::common::NONE_READY, FAILURE = basis::common::FAILURE } |
Public Member Functions | |
| virtual | ~recursive_file_copy () |
| DEFINE_CLASS_NAME ("recursive_file_copy") | |
Static Public Member Functions | |
| static const char * | outcome_name (const basis::outcome &to_name) |
| static basis::outcome | copy_hierarchy (int transfer_mode, const basis::astring &source_dir, const basis::astring &target_dir, const structures::string_array &includes, const basis::astring &source_start=basis::astring::empty_string()) |
| copies a directory hierarchy starting at "source_dir" into "target_dir". | |
Copies entire hierarchies in the file system from one place to another.
Definition at line 26 of file recursive_file_copy.h.
Definition at line 33 of file recursive_file_copy.h.
| octopi::recursive_file_copy::~recursive_file_copy | ( | ) | [virtual] |
Definition at line 52 of file recursive_file_copy.cpp.
| outcome octopi::recursive_file_copy::copy_hierarchy | ( | int | transfer_mode, | |
| const basis::astring & | source_dir, | |||
| const basis::astring & | target_dir, | |||
| const structures::string_array & | includes, | |||
| const basis::astring & | source_start = basis::astring::empty_string() | |||
| ) | [static] |
copies a directory hierarchy starting at "source_dir" into "target_dir".
the "transfer_mode" is a combination of mode values from the file_transfer_tentacle class, and dictates how the files to copy will be decided. the "includes" is a list of files that will be included. if that is an empty array, then all files will be included. the "source_start" is a subdirectory within the source to start copying at; only items there and below will be included.
Definition at line 62 of file recursive_file_copy.cpp.
References octopi::file_transfer_infoton::_command, octopi::file_transfer_infoton::_dest_root, filesystem::file_transfer_header::_length, octopi::file_transfer_infoton::_packed_data, octopi::file_transfer_infoton::_request, octopi::file_transfer_infoton::_src_root, octopi::octopus::acquire_specific_result(), octopi::file_transfer_tentacle::add_correspondence(), octopi::octopus::add_tentacle(), BASE_LOG, filesystem::directory_tree::calculate(), octopi::file_transfer_tentacle::COMPARE_CONTENT_SAMPLE, copy(), octopi::octopus::evaluate(), FAILURE, FAKE_HOSTNAME, FUNCDEF, GARBAGE, octopi::octopus::issue_identity(), basis::array< contents >::length(), octopi::MAX_CHUNK_RFC_COPY_HIER, basis::MEGABYTE, basis::MINUTE_ms, NONE_READY, NOT_FOUND, OKAY, octopi::tentacle::OKAY, octopi::file_transfer_infoton::package_tree_info(), octopi::file_transfer_infoton::PLACE_FILE_CHUNKS, filesystem::file_transfer_header::readable_text_form(), octopi::file_transfer_tentacle::register_file_transfer(), RETURN_ERROR_RFC, basis::astring::t(), octopi::file_transfer_infoton::TREE_COMPARISON, filesystem::file_transfer_header::unpack(), filesystem::filename_list::unpack(), and basis::array< contents >::zap().
| octopi::recursive_file_copy::DEFINE_CLASS_NAME | ( | "recursive_file_copy" | ) |
| const char * octopi::recursive_file_copy::outcome_name | ( | const basis::outcome & | to_name | ) | [static] |
Definition at line 54 of file recursive_file_copy.cpp.
1.6.3