/// <summary> /// Gathers all the assets from a specific folder into our asset folder /// </summary> public void GatherAssetFiles(string fromDir) { if (!IO.Directory.Exists(AssetDirectory)) { IO.Directory.CreateDirectory(AssetDirectory); } string blob = AssetHandler.getStartingDirectory(fromDir, "BLOBS"); string asset = AssetHandler.getStartingDirectory(fromDir, "assets"); foreach (string file in directoryServer.AssetManifestList) { //Check the inner zone asset folder first string filePath = AssetHandler.findAssetFile(file, asset); if (filePath == null) { //Get it from the blob folder instead filePath = AssetHandler.findAssetFile(file, blob); if (filePath == null) { //Still cant find it? Just skip it continue; } } if (filePath != null) { try { string path = IO.Path.Combine(AssetDirectory, file); //Lets copy it over if (IO.File.Exists(path)) { IO.File.Delete(path); } IO.File.Copy(filePath, path); } catch (Exception e) { Log.write(TLog.Warning, e.ToString()); } } } }