Exemplo n.º 1
0
        /// <summary>
        /// 拷贝当前到其他目录
        /// </summary>
        /// <param name="sourceh"></param>
        public static void CopySqlToOther(string root, RuntimePlatform sourcePlatform)
        {
            var target = SqliteLoder.GetLocalDBPath(root, sourcePlatform);
            var bytes  = File.ReadAllBytes(target);

            //拷贝当前到其他目录
            foreach (var p in BApplication.SupportPlatform)
            {
                var outpath = SqliteLoder.GetLocalDBPath(root, p);
                if (target == outpath)
                {
                    continue;
                }
                FileHelper.WriteAllBytes(outpath, bytes);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 拷贝当前到其他目录
        /// </summary>
        /// <param name="sourceh"></param>
        public static void CopySqlToOther(string root, RuntimePlatform sourcePlatform)
        {
            RuntimePlatform[] ps = new RuntimePlatform[] { RuntimePlatform.WindowsEditor, RuntimePlatform.IPhonePlayer, RuntimePlatform.Android };

            var target = SqliteLoder.GetLocalDBPath(root, sourcePlatform);
            var bytes  = File.ReadAllBytes(target);

            //拷贝当前到其他目录

            foreach (var p in ps)
            {
                var outpath = SqliteLoder.GetLocalDBPath(root, p);
                if (target == outpath)
                {
                    continue;
                }
                FileHelper.WriteAllBytes(outpath, bytes);
            }
        }