public JsonResult Dir(Dictionary<string, string> env, string[] args) { var blobFile = new BlobFile2(User.Identity.Name, env["path"]); var sb = new StringBuilder(); foreach (var s in blobFile.ListFiles()) { sb.Append(String.Format("{0}\t{1}\t{2}\t{3}\n", s.Path().Name(), s.IsDirectory() ? "D" : "-", s.Length(), s.LastModified())); } return SuccessWrapper(sb.ToString()); }
public ActionResult Index(string path = "/") { var file = new BlobFile2(User.Identity.Name, path); ViewData["files"] = file.ListFiles(); var paths = path.Split('/').ToList(); if (paths[paths.Count() - 1] == "") { paths.RemoveAt(paths.Count() - 1); } paths.RemoveAt(0); ViewData["paths"] = paths; ViewData["path"] = path; return View(); }