summaryrefslogtreecommitdiff
path: root/src/asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-03-06 01:01:04 +0100
committerCarl Hetherington <cth@carlh.net>2023-03-06 01:01:04 +0100
commit53b444191fddd72416647ec9d24aff1e317a1824 (patch)
treed2f2ec726c1df87ba399f4b1ce1afcf4ad278fa6 /src/asset.h
parentbe24bd183525f300c7699dd6b4c058a1e00cc5d7 (diff)
Add Asset::rename_file().
Diffstat (limited to 'src/asset.h')
-rw-r--r--src/asset.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/asset.h b/src/asset.h
index a6b0ed56..923720ff 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -109,6 +109,14 @@ public:
*/
void set_file (boost::filesystem::path file) const;
+ /** Set the file that holds this asset on disk. The new file must
+ * be exactly the same as the old one, as this function assumes
+ * that the object's hash does not change.
+ *
+ * @param file New file's path.
+ */
+ void rename_file(boost::filesystem::path file);
+
/** Calculate the hash of this asset's file, if it has not already been calculated,
* then return it
* @param progress Function that will be called with a parameter between 0 and 1 to indicate