Beispiel #1
0
        public DiskPathCollection Get(string potName)
        {
            PotDirectory potDirectory = PotDirectory.FromPotName(potName);

            if (!potDirectory.IsValid)
            {
                throw new Exception($"There is no pot with name '{potName}'.");
            }

            BlackListFile blackListFile = potDirectory.OpenBlackListFile("bl");

            return(new DiskPathCollection(blackListFile.Items));
        }
Beispiel #2
0
        public void Delete(string potName, DiskPath path)
        {
            PotDirectory potDirectory = PotDirectory.FromPotName(potName);

            if (!potDirectory.IsValid)
            {
                throw new Exception($"There is no pot with name '{potName}'.");
            }

            BlackListFile blackListFile = potDirectory.OpenBlackListFile("bl");

            blackListFile.Remove(path);
            blackListFile.Save();
        }