символьные ссылки в планировщике

This commit is contained in:
2025-02-06 21:23:55 +03:00
parent bd2e8643fd
commit 0c2b716368
6 changed files with 14 additions and 12 deletions

View File

@@ -65,6 +65,15 @@ public:
//printf("cp '%s' return code = %d\n",src.getCharArray(), i);
#endif
}
static void Ln(const String& src, const String& dst) {
#if __cplusplus >= 201703L
std::filesystem::create_symlink(src.getCharArray(), dst.getCharArray());
#else
String command = "ln -s " + String::DQuotes(src) + " " + String::DQuotes(dst);
int i = system(command.getCharArray());
//printf("cp '%s' return code = %d\n",src.getCharArray(), i);
#endif
}
static void CopyDirectory(const String& src, const String& dst) {
#if __cplusplus >= 201703L
std::filesystem::copy((src+ "/.").getCharArray(), dst.getCharArray(), std::filesystem::copy_options::recursive);