S
Samuel R. Neff
I have a file in a directory that is returned from
Directory.GetFiles() but subsequently fails a File.Exists() check.
Test code:
string p = @"C:\documents and settings\all users\" +
@"application data\macromedia\fms";
foreach(string path in Directory.GetFiles(p)) {
if ( ! File.Exists(path)) {
foreach(char c in Path.GetFileName(path)) {
Console.WriteLine((int)c);
}
}
}
prints out this:
160
160
160
32
160
160
160
That's the real directory, the one file in it was created by Flash
Media Server and is very small, just has some numbers in it followed
by a null-byte. In explorer the name looks like it's blank. I can
open it in other apps (Notepad), but in .NET I get
FileNotFoundException trying to access it.
Any explanation as to what .NET is doing here? This has got to be a
bug, right?
Working with .NET 2.0.
Thanks,
Sam
Directory.GetFiles() but subsequently fails a File.Exists() check.
Test code:
string p = @"C:\documents and settings\all users\" +
@"application data\macromedia\fms";
foreach(string path in Directory.GetFiles(p)) {
if ( ! File.Exists(path)) {
foreach(char c in Path.GetFileName(path)) {
Console.WriteLine((int)c);
}
}
}
prints out this:
160
160
160
32
160
160
160
That's the real directory, the one file in it was created by Flash
Media Server and is very small, just has some numbers in it followed
by a null-byte. In explorer the name looks like it's blank. I can
open it in other apps (Notepad), but in .NET I get
FileNotFoundException trying to access it.
Any explanation as to what .NET is doing here? This has got to be a
bug, right?
Working with .NET 2.0.
Thanks,
Sam