Esempio n. 1
0
 public static bool FolderExists(string path)
 {
     try
     {
         if (Settings.Data[2] == "0") // game
         {
             return(FileTree.ContainsKey(path.Replace(@"\"[0], @"/"[0])));
         }
         else if (Settings.Data[2] == "1") // online
         {
             /* ??? */
         }
         else if (Settings.Data[2] == "2") // extracted
         {
             bool exists = Directory.Exists(Settings.Data[8] + @"\" + path);
             return(exists);
         }
         return(false);
     }
     catch
     {
         Debug.Log("CASC Error: Can't check if the folder exists.");
         return(false);
     }
 }
Esempio n. 2
0
 public static bool FolderExists(string path)
 {
     if (Settings.Data[2] == "0") // game
     {
         return(FileTree.ContainsKey(path.Replace(@"\"[0], @"/"[0])));
     }
     else if (Settings.Data[2] == "1") // online
     {
         /* ??? */
     }
     else if (Settings.Data[2] == "2") // extracted
     {
         bool exists = Directory.Exists(path);
         return(exists);
     }
     return(false);
 }