diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-03-14 14:47:59 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-03-18 20:57:40 (GMT) |
commit | fa1897b1889f7bf74de68f1ac99cf3be343a7551 (patch) | |
tree | ea14c45937cb6fef237c0fcafbd5b0923abd8f0a /src/dir.cpp | |
parent | 0d05e79d67b5b808918541f429b06805207e8bdb (diff) | |
download | Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.zip Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.tar.gz Doxygen-fa1897b1889f7bf74de68f1ac99cf3be343a7551.tar.bz2 |
Refactoring: replace QFile/FTextStream with fstream/stringstream
Diffstat (limited to 'src/dir.cpp')
-rw-r--r-- | src/dir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dir.cpp b/src/dir.cpp index caef5c7..558045b 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -259,6 +259,16 @@ bool Dir::rename(const std::string &orgName,const std::string &newName,bool acce return !ec; } +bool Dir::copy(const std::string &srcName,const std::string &dstName,bool acceptsAbsPath) const +{ + const auto copyOptions = fs::copy_options::overwrite_existing; + std::error_code ec; + std::string sn = filePath(srcName,acceptsAbsPath); + std::string dn = filePath(dstName,acceptsAbsPath); + fs::copy(sn,dn,copyOptions,ec); + return !ec; +} + std::string Dir::currentDirPath() { std::error_code ec; |