Пример #1
0
 /// <summary>Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns
 /// true if the underlying file descriptor is valid, and false otherwise.
 /// This can be used to determine if the OS file has been closed.
 /// The descriptor becomes invalid when the non-clone instance of the
 /// SimpleFSIndexInput that owns this descriptor is closed. However, the
 /// descriptor may possibly become invalid in other ways as well.
 /// </summary>
 public static bool IsSimpleFSIndexInputOpen(IndexInput is_Renamed)
 {
     if (IsSimpleFSIndexInput(is_Renamed))
     {
         SimpleFSIndexInput fis = (SimpleFSIndexInput)is_Renamed;
         return(fis.IsFDValid());
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 /// <summary>
 /// Given an instance of <see cref="SimpleFSIndexInput"/>, this method returns
 /// true if the underlying file descriptor is valid, and false otherwise.
 /// this can be used to determine if the OS file has been closed.
 /// The descriptor becomes invalid when the non-clone instance of the
 /// <see cref="SimpleFSIndexInput"/> that owns this descriptor is disposed. However, the
 /// descriptor may possibly become invalid in other ways as well.
 /// </summary>
 public static bool IsSimpleFSIndexInputOpen(IndexInput @is)
 {
     if (IsSimpleFSIndexInput(@is))
     {
         SimpleFSIndexInput fis = (SimpleFSIndexInput)@is;
         return(fis.IsFDValid);
     }
     else
     {
         return(false);
     }
 }