// GET api/<controller> public DriveDTO Get([FromUri] string name = "") { List <String> FolderList = new List <string>(); RDirectoryItem CurrentFolder = new RDirectoryItem(); string FolderPath = string.Empty; Member CurrentUser = db.Members.FirstOrDefault(d => d.Email == User.Identity.Name); DriveManager DM = new DriveManager(CurrentUser, System.Web.Hosting.HostingEnvironment.MapPath(Utility.SiteDriveFolderPath), string.Format("{0}/{1}", Utility.SiteURL, Utility.SiteDriveFolderName)); DM.ItemDeletable = true; if (!string.IsNullOrEmpty(name)) { FolderPath = name; } FolderList = FolderPath.Split('/').ToList <string>(); CurrentFolder = DM.GetFolderName(FolderPath); DriveDTO result = new DriveDTO(); result.Crumbs.AddRange(DM.GetCrumbs(FolderPath)); result.Directories.AddRange(DM.GetDirectoryItemList(FolderPath)); result.Files.AddRange(DM.GetFileItemList(FolderPath)); return(result); }