public ActionResult Index(string folderLink) { if (folderLink != null) { Folder currentFolder = FolderWorker.GetFolderByLink(folderLink); if (currentFolder == null) { return(HttpNotFound($"Couldn't find folder")); } return(View(new ParentFolder(currentFolder))); } return(View(new ParentFolder())); }
internal bool BrewFileExists(IBrew brew) { DirectoryInfo dir = new DirectoryInfo(fileServerPath); string year = brew.Year; string month = brew.Month.ToLower(); string brewNumber = brew.BrewNumber; string day = brew.Day; bool yearFolderExists = FolderWorker.IsSubDirectory(fileServerPath, year); bool monthFolderExists = FolderWorker.IsSubDirectory(fileServerPath + folderSeparator + year, month); bool fileExists = FolderWorker.FileInFolder(fileServerPath + folderSeparator + year + folderSeparator + month + folderSeparator + day, brewNumber + ".txt"); if (yearFolderExists && monthFolderExists && fileExists) { return(true); } return(false); }
public ParentFolder() { childrenFolders.Add(new ChildrenFolder(FolderWorker.GetMainFolder())); }
public ChildrenFolder(Folder folder) { FolderName = folder.FolderName; FolderLink = FolderWorker.GetFolderLink(folder); }