Expose file copying helper in public interface

This commit is contained in:
TheAssassin 2019-08-14 01:33:09 +02:00
parent 9dc10fc0fc
commit 3fd595a63b
2 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,9 @@ namespace linuxdeploy {
// deploy arbitrary file
boost::filesystem::path deployFile(const boost::filesystem::path& from, const boost::filesystem::path& to);
// copy arbitrary file (immediately)
bool copyFile(const boost::filesystem::path& from, const boost::filesystem::path& to, bool overwrite = false) const;
// create an <AppDir> relative symlink to <target> at <symlink>.
bool createRelativeSymlink(const boost::filesystem::path& target, const boost::filesystem::path& symlink) const;

View File

@ -824,6 +824,10 @@ namespace linuxdeploy {
return d->deployFile(from, to, true);
}
bool AppDir::copyFile(const bf::path& from, const bf::path& to, bool overwrite) const {
return d->copyFile(from, to, overwrite);
}
bool AppDir::createRelativeSymlink(const bf::path& target, const bf::path& symlink) const {
return d->symlinkFile(target, symlink, true);
}