Lucene.Net.Store.RAMDirectory.FileLength C# (CSharp) Method

FileLength() public method

Returns the length in bytes of a file in the directory.
public FileLength ( System name ) : long
name System
return long
		public override long FileLength(System.String name)
		{
			EnsureOpen();
			RAMFile file;
			lock (this)
			{
				file = fileMap[name];
			}
			if (file == null)
				throw new System.IO.FileNotFoundException(name);
			return file.Length;
		}
		

Usage Example

コード例 #1
0
 public override long FileLength(string name)
 {
     lock (this)
     {
         if (Cache.FileExists(name))
         {
             return(Cache.FileLength(name));
         }
         else
         {
             return(@delegate.FileLength(name));
         }
     }
 }
All Usage Examples Of Lucene.Net.Store.RAMDirectory::FileLength