private void CreateBin() { string BinName = GetNewBinName(); DvdBin dvdBin = new DvdBin(BinName, 4692251770.88); Bins.Add(dvdBin); Log.Information("Created bin {a}", dvdBin.Name); }
private DvdBin CreateDvdBin() { string DvdName = Path.GetDirectoryName(FolderPath); DvdBin dvdBin = new DvdBin(DvdName); foreach (FileToImport file in Files) { dvdBin.Files.Add(file.File); } return dvdBin; }
private void CreateFolder(DvdBin dvdBin) { string newFolder = Path.Combine(LocalFolder, dvdBin.Name); if (!Directory.Exists(newFolder)) { Directory.CreateDirectory(newFolder); } else { Log.Error("Folder {a} already exists!", newFolder); } }
private void MoveFilesIntoBinFolder(DvdBin dvdBin) { string targetFolder = Path.Combine(LocalFolder, dvdBin.Name); if (Directory.Exists(targetFolder)) { foreach (FileInfo file in dvdBin.Files) { file.MoveTo(Path.Combine(targetFolder, file.Name)); Log.Information("Moved {a} to {b}", file.Name, targetFolder); } } else { Log.Error("Folder {a} does not exist. Skipping.", targetFolder); } }