Beispiel #1
0
        /// <summary>
        /// 解压文件名
        /// </summary>
        /// <returns></returns>
        public JsonResult UnRAR()
        {
            string name    = Request["name"].ToString();
            string newname = Request["newname"].ToString();

            if (RarHelper.UnRAR(Maincontrol.GetFullPath(name), Maincontrol.GetFullPath(newname) + @"\" + name.Split('.')[0]))
            {
                Maincontrol.NewFloder(name.Split('.')[0], Maincontrol.GetID(newname), Maincontrol.GetRelativePath(newname) + @"\" + name.Split('.')[0]);
                Filetransfer.FindFile(new DirectoryInfo(Maincontrol.GetFullPath(newname) + @"\" + name.Split('.')[0]));
                return(Json(true));
            }
            else
            {
                return(Json(false));
            }
        }