]> git.tdb.fi Git - libs/core.git/blobdiff - source/utils.cpp
Add chdir function
[libs/core.git] / source / utils.cpp
index 18784b3a423bb8b5d165c79ef95d72db0d594877..d9522a3c6551d264ccf9896ef780b340220a99ef 100644 (file)
@@ -244,4 +244,10 @@ Path get_home_dir()
 #endif
 }
 
+void chdir(const Path &path)
+{
+       if(::chdir(path.str().c_str())==-1)
+               throw SystemError("chdir failed", errno);
+}
+
 } // namespace Msp