From 5521a0edd9a2ba8429f7d2e48f754c9d6f66cc3b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 17 Aug 2020 12:04:33 +0200 Subject: Add mvfile() filesystem utility function --- libbuild2/filesystem.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libbuild2/filesystem.hxx') diff --git a/libbuild2/filesystem.hxx b/libbuild2/filesystem.hxx index aedfed2..5d26524 100644 --- a/libbuild2/filesystem.hxx +++ b/libbuild2/filesystem.hxx @@ -78,6 +78,11 @@ namespace build2 LIBBUILD2_SYMEXPORT fs_status mkdir_p (const dir_path&, uint16_t verbosity = 1); + // Rename a file (or file symlink) overwriting the destination if exists. + // + void + mvfile (const path& from, const path& to, uint16_t verbosity = 1); + // Remove the file (unless dry-run) and print the standard diagnostics // starting from the specified verbosity level. The second argument is only // used in diagnostics, to print the target name. Passing the path for -- cgit v1.1