using System;
using System.IO;
public class ToukaEditorUtils
{
    public static void Merge(string srcPath, string dstPath, bool ignoreMeta = false, Action<string> onProccessedCallbak = null)
    {
        if (!Directory.Exists(dstPath))
            Directory.CreateDirectory(dstPath);
        foreach (string file in Directory.GetFiles(srcPath))
        {
            if (ignoreMeta && file.EndsWith(".meta"))
                continue;

            string des;
            des = Path.Combine(dstPath, Path.GetFileName(file));
            File.Copy(file, des, true);
            if (onProccessedCallbak != null)
                onProccessedCallbak(des);
        }

        foreach (string dir in Directory.GetDirectories(srcPath))
            Merge(dir, Path.Combine(dstPath, Path.GetFileName(dir)), ignoreMeta, onProccessedCallbak);
    }
}
