indeed, CopyFile cannot take a directory as destination path, only a file name. Thus, we have an exception thrown :
- Code: Select all
Path p("C:\tmp\testPoco\test1");
File testDir(p);
testDir.createDirectories();
try {
File f(p.parent().append(nextTotoName(0)));
f.createFile();
string dest(testDir.path());
f.moveTo(dest);
} catch (FileAccessDeniedException& e) {
cerr << e.displayText() << endl;
}
will display the error message. I think this should be patched very quickly, as documentation claims that target can be a directory.
Then, what about copying/moving a complete directory to another ?





