private List<SnapshotFile> GetSnapshotFileInfos(string FilePath)
{
List<SnapshotFile> Files = new List<SnapshotFile>();
// Grab all files with the .txt extension
foreach (string File in Directory.EnumerateFiles(FilePath, "*.txt"))
{
try
{
// Get filename
string fileName = Path.GetFileName(File);
// Check Formatting
if (!fileName.Contains('-') || !fileName.Contains('_'))
continue;
// Create new snapshot file into
Files.Add(new SnapshotFile(fileName));
}
catch
{
continue;
}
}
return Files;
}