예제 #1
0
        static string SaveLoadingVersionFile(string path)
        {
            int version;

            TryReadBuildingVersion(out version);
            Uploader.CreateDirectory(path);
            File.WriteAllText(path, version.ToString());
            return(version.ToString());
        }
예제 #2
0
        public void Build(string folder)
        {
            string name       = Path.GetFileName(m_assetPath);
            string targetPath = string.Format("{0}/{1}/{2}", folder, outputFolderName, name.ToLower());

            Uploader.CreateDirectory(targetPath);
            File.Delete(targetPath);
            File.Copy(m_assetPath, targetPath);
        }
예제 #3
0
 static void SaveBuildingListFile(List <BaseAssetManager> managerList, string path, ref StringBuilder sb)
 {
     sb.Length = 0;
     foreach (var manager in managerList)
     {
         foreach (var item in manager.items)
         {
             string config = item.GenerateConfigLine();
             sb.AppendLine(config);
         }
     }
     Uploader.CreateDirectory(path);
     File.WriteAllText(path, sb.ToString());
 }
예제 #4
0
        static void CopyFiles(string fromDir, string toDir)
        {
            string[] files = Directory.GetFiles(fromDir, "*.*", SearchOption.AllDirectories);
            int      formDirLen = fromDir.Length;
            string   relativePath, targetFile;

            for (int i = 0, j = files.Length; i < j; i++)
            {
                relativePath = files[i].Substring(formDirLen);
                targetFile   = string.Format("{0}{1}", toDir, relativePath);
                Uploader.CreateDirectory(targetFile);
                File.Copy(files[i], targetFile, true);
            }
        }