The Microsoft NETMF 4.0 API reference shows that System.IO.Directory has two overloaded GetFiles methods. The one shown below, which takes a search pattern to match files against seems to be missing. Can anyone else verify that it seems to be absent?
public static string GetFiles (
string path,
string searchPattern
)
From what I’ve seen on other sites, this method is used by .Net Framework, not MicroFramework. And all the samples in MicroFramework that were using GetFiles were using the one with only 1 parameter.
private static string[] GetChildren(string path, string searchPattern, bool isDirectory)
{
// path and searchPattern validation in Path.GetFullPath() and Path.NormalizePath()
path = Path.GetFullPath(path);
Path.NormalizePath(searchPattern, true);
ArrayList fileNames = new ArrayList();
string root = Path.GetPathRoot(path);
if (String.Equals(root, path))
{
/// This is special case. Return all the volumes.
/// Note this will not work, once we start having \\server\share like paths.
if (isDirectory)
{
VolumeInfo[] volumes = VolumeInfo.GetVolumes();
int count = volumes.Length;
for (int i = 0; i < count; i++)
{
fileNames.Add(volumes[i].RootDirectory);
}
}
}
So searchpattern is implemented but not used
@ Support : code tags also didn’t work
When I add two diffferent code snippets only the first snippet was displayed , but two times.