My project is not finding files that definitely exist. I am using the Stanford NLP library and was getting file not found exceptions which I began debugging.
Here is my test code:
String jarRoot = @"stanford-corenlp-full-2016-10-31\stanford-corenlp-full-2016-10-31\stanford-corenlp-3.7.0-models\edu\stanford\nlp\models\pos-tagger\english-left3words\";
foreach (String fName in Directory.GetFiles(jarRoot))
{
Console.WriteLine("File in jarRoot: " + fName);
Console.WriteLine("File exists? " + File.Exists(fName));
}
The output:
File in jarRoot: stanford-corenlp-full-2016-10-31\stanford-corenlp-full-2016-10-31\stanford-corenlp-3.7.0-models\edu\stanford\nlp\models\pos-tagger\english-left3words\english-left3words-distsim.tagger
File exists? False
File in jarRoot: stanford-corenlp-full-2016-10-31\stanford-corenlp-full-2016-10-31\stanford-corenlp-3.7.0-models\edu\stanford\nlp\models\pos-tagger\english-left3words\english-left3words-distsim.tagger.props
File exists? False
How could File.Exists() possibly be returning false?