public FileDb CollectFilesFromDirectoryProvidedBySecretsAndSaveAsEmbed() { var dirName = this.Configuration["directoryName"]; var specialDirPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\" + dirName; var fileExists = File.Exists("first.embed"); if (fileExists) { File.Delete("first.embed"); } var embed = FileDb.NewFile("first.embed"); var txtFiles = Directory.GetFiles(specialDirPath, "*"); foreach (var file_ in txtFiles) { embed.CollectFile(file_, FileType.Text); } embed.Build(); return(embed); }
public FileDb CollectFilesFromProvidedDirectoryAndSaveAsEmbed( string directoryPath) { var embed = FileDb.NewFile("first.embed"); var txtFiles = Directory.GetFiles(directoryPath, "*"); foreach (var file_ in txtFiles) { embed.CollectFile(file_, FileType.Text); } embed.Build(); return(embed); }