public void GenerateLabelFolderNames(string input, string shouldBe)
        {
            var artistFolder = FolderPathHelper.LabelPath(Configuration, input);
            var t            = new DirectoryInfo(Path.Combine(Configuration.LabelImageFolder, shouldBe));

            Assert.Equal(t.FullName, artistFolder);
        }
Exemple #2
0
        /// <summary>
        ///     Returns a full file path to the Label Image
        /// </summary>
        public string PathToImage(IRoadieSettings configuration, bool makeFolderIfNotExist = false)
        {
            var folder = FolderPathHelper.LabelPath(configuration, SortNameValue);

            if (!Directory.Exists(folder) && makeFolderIfNotExist)
            {
                Directory.CreateDirectory(folder);
            }
            return(Path.Combine(folder, $"{ SortNameValue.ToFileNameFriendly() } [{ Id }].jpg"));
        }