SIL.Utils.MockFileOS.GetKey C# (CSharp) Method

GetKey() private method

Gets the key for the file info for the given filename (Using a case-insensitive lookup).
File not found
private GetKey ( string filename ) : string
filename string The fully-qualified file name
return string
		private string GetKey(string filename)
		{
			if (m_existingFiles.ContainsKey(filename))
				return filename;
			string filenameLower = filename.ToLowerInvariant();
			foreach (string fileKey in m_existingFiles.Keys)
			{
				if (fileKey.ToLowerInvariant() == filenameLower)
					return fileKey;
			}
			throw new FileNotFoundException("File " + filename + " not found.");
		}
		#endregion