Add IFolder.AllFileNames() for listing the filenames in a package.

This commit is contained in:
Paul Chote
2013-05-17 23:44:33 +12:00
parent 974e9b3325
commit 9dc3f4bf2d
4 changed files with 58 additions and 2 deletions

View File

@@ -54,6 +54,12 @@ namespace OpenRA.FileFormats
}
}
public IEnumerable<string> AllFileNames()
{
foreach (var filename in Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly))
yield return Path.GetFileName(filename);
}
public bool Exists(string filename)
{
return File.Exists(Path.Combine(path, filename));