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

FileModified() public method

Returns the time the named file was last modified.
public FileModified ( System name ) : long
name System
return long
		public override long FileModified(System.String name)
		{
			EnsureOpen();
			RAMFile file;
			lock (this)
			{
				file = fileMap[name];
			}
			if (file == null)
				throw new System.IO.FileNotFoundException(name);
            
            // RAMOutputStream.Flush() was changed to use DateTime.UtcNow.
            // Convert it back to local time before returning (previous behavior)
		    return new DateTime(file.LastModified*TimeSpan.TicksPerMillisecond, DateTimeKind.Utc).ToLocalTime().Ticks/
		           TimeSpan.TicksPerMillisecond;
		}