internal static List <UploaderSettings> LoadAll() { var dir = CurrentExe.GetDirectory(); var ext = "*.cfg"; var matches = Directory.EnumerateFiles(dir, ext); return(matches.Select(file => { var cfg = JsonFile.Read <UploaderSettings>(file); cfg.Filename = Path.GetFileNameWithoutExtension(file); return cfg; } ).ToList()); }
private string ExeDirIfBlank(string foldrPath) => foldrPath.IsBlank() ? CurrentExe.GetDirectory() : foldrPath;