Lucene.Net.Util.LuceneTestCase.SlowFileExists C# (CSharp) 메소드

SlowFileExists() 공개 정적인 메소드

Returns true if the file exists (can be opened), false if it cannot be opened, and (unlike Java's File.exists) if there's some unexpected error.
public static SlowFileExists ( Directory dir, string fileName ) : bool
dir Directory
fileName string
리턴 bool
        public static bool SlowFileExists(Directory dir, string fileName)
        {
            return dir.FileExists(fileName);
            /*try
            {
                dir.OpenInput(fileName, IOContext.DEFAULT).Dispose();
                return true;
            }
            catch (FileNotFoundException e)
            {
                return false;
            }*/
        }