예제 #1
0
파일: ModelManager.cs 프로젝트: jTitor/leek
 /**
  * true iff model successfully written
  */
 public bool SaveModel(string path)
 {
     if (!FileSystemOps.PathIsValid(path))
     {
         return(false);
     }
     ImporterOps.ExportModel(path, 1);
     updateLog();
     return(true);
 }
예제 #2
0
파일: ModelManager.cs 프로젝트: jTitor/leek
        /**
         * true iff directory successfully changed
         */
        public bool ChangeCWD(string newPath)
        {
            //reset if the address is obviously invalid
            if (!FileSystemOps.PathIsValid(newPath))
            {
                return(false);
            }
            var newCwd = new DirectoryInfo(newPath);

            if (!newCwd.Exists)
            {
                return(false);
            }
            //otherwise go to where the address bar is pointing
            cwd = new DirectoryInfo(newPath);
            return(true);
        }