예제 #1
0
        /// <summary>
        /// 删除指定Bundle模块,默认实现备份至配置目录
        /// </summary>
        /// <param name="bundle">Bundle实例对象</param>
        public void Delete(IBundle bundle)
        {
            log.Debug(string.Format("卸载模块备份至[{0}]目录!", bundlesUninstallPath));

            var bundlePath    = bundle.GetBundleDirectoryPath();
            var newbundlePath = string.Format("{0}_{1}", new DirectoryInfo(bundlePath).Name, DateTime.Now.Ticks);

            if (!Directory.Exists(bundlesUninstallPath))
            {
                Directory.CreateDirectory(bundlesUninstallPath);
            }
            Directory.Move(bundle.GetBundleDirectoryPath(), Path.Combine(bundlesUninstallPath, newbundlePath));
        }