Jelajahi Sumber

adde changeDirectory

Ken Martin 24 tahun lalu
induk
melakukan
242a236db4
2 mengubah file dengan 8 tambahan dan 1 penghapusan
  1. 4 0
      Source/cmSystemTools.cxx
  2. 4 1
      Source/cmSystemTools.h

+ 4 - 0
Source/cmSystemTools.cxx

@@ -906,6 +906,10 @@ bool cmSystemTools::FileIsDirectory(const char* name)
     }
     }
 }
 }
 
 
+int cmSystemTools::ChangeDirectory(const char *dir)
+{
+  return Chdir(dir);
+}
 
 
 std::string cmSystemTools::GetCurrentWorkingDirectory()
 std::string cmSystemTools::GetCurrentWorkingDirectory()
 {
 {

+ 4 - 1
Source/cmSystemTools.h

@@ -237,7 +237,10 @@ public:
 
 
   ///! Generate a temporary file name
   ///! Generate a temporary file name
   static std::string TemporaryFileName();
   static std::string TemporaryFileName();
-  
+
+  ///! change directory the the directory specified
+  static int ChangeDirectory(const char* dir);
+    
 private:
 private:
   static bool s_ErrorOccured;
   static bool s_ErrorOccured;
 };
 };