]> git.tdb.fi Git - libs/core.git/blobdiff - source/utils.h
Style update: spaces around assignments
[libs/core.git] / source / utils.h
index 9b4a1e0f706d972f3f3cfbc3472a047cbd35129e..6a4c55add16f7ec305d40341d7f65fe48d65710b 100644 (file)
@@ -46,9 +46,16 @@ Path realpath(const Path &path);
 /// Removes a file
 void unlink(const Path &path);
 
+/// Renames a file.  Existing file, if any, is overwritten.
+void rename(const Path &from, const Path &to);
+
 /// Makes a path relative to some base path.  That is, base/result==path.
 Path relative(const Path &path, const Path &base);
 
+/** Determines how many levels a path is below another.  Returns -1 if path is
+not a descendant of parent. */
+int descendant_depth(const Path &path, const Path &parent);
+
 } // namespace FS
 } // namespace Msp