Exploere/Controllers/ExploereController.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Exploere.Models;
using System.IO;
using System.Text;
using System.Drawing.Imaging;
using System.Drawing;
namespace Exploere.Controllers
{
public class ExploereController : Controller
{
// GET: Exploere
public ActionResult Index()
{
return View();
}
/// <summary>
/// 获取磁盘驱动器
/// </summary>
/// <returns></returns>
public ActionResult GetDrives()
{
List<Drives> driveslist = new Service().GetDrives();
return Json(driveslist,JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 获取目录
/// </summary>
/// <returns></returns>
public ActionResult GetFolders(string path)
{
List<Folder> folderlist = new Service().GetFolders(path);
return Json(folderlist,JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 获取文件
/// </summary>
/// <returns></returns>
public ActionResult GetFiles(string path)
{
List<Files> filelist = new Service().GetFiles(path);
return Json(filelist,JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 删除文件
/// </summary>
/// <param name="path"></param>
public bool DeleteFile(string path)
{
bool b = false;
try
{
FileInfo file = new FileInfo(path);
if (path != "")
{
file.Delete();
后面还有 111 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。