#include <xtd/xtd>
class program {
public:
static void copy_directory(const string& source_directory, const string& target_directory) {
if(!source.exists())
return;
if(!target.exists())
target.create();
for(
size_t i = 0;
i < source_files.
size(); ++
i)
file::copy(source_files[i].full_name(), target.full_name() +"\\" + source_files[i].name(), true);
for(
size_t j = 0;
j < source_directories.
size(); ++
j)
copy_directory(source_directories[j].full_name(), target.full_name() + "\\" + source_directories[j].name());
}
static auto main() {
copy_directory("D:\\Tools","D:\\NewTools");
}
};
virtual size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(xtd::collections::generic::list::...
Definition list.h:365
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:72
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.h:129
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:175
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.h:15
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.h:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10