toroso/fs4net — Issue #2: The filename of the path is empty on ".hg" directory.
Author: drucik86
Created: 2011-12-04 20:12:02+00:00
State: open

Hello,

I try to find all files recursively with specified extension using AllFilesRecursively() method of RootedDirectory, but when I have ".hg" directory in searched directory, I got exception with message: "The filename of the path is empty on ...". I known that it right on Windows that files must be a name, but VCSs like Git, Mercurial or SVN has directories with extension only.

In my project I used code as below:
string directoryPath = @"C:\my\directory";
IFileSystem fileSystem = new FileSystem();
RootedDirectory directory = fileSystem.DirectoryDescribing(directoryPath);
IEnumerable files = directory.AllFilesRecursively().Where(f => f.FileName().Extension().Equals(".resx"));

Maybe I do something wrong when I try to check the file extension, but can't contact with You by another way than creating new issue.

Regards,
Michał Zalewski