System.TermInfoDriver.SearchTerminfo C# (CSharp) Method

SearchTerminfo() static private method

static private SearchTerminfo ( string term ) : string
term string
return string
		static string SearchTerminfo (string term)
		{
			if (term == null || term == String.Empty)
				return null;

			string path;
			string terminfo = Environment.GetEnvironmentVariable ("TERMINFO");
			if (terminfo != null && Directory.Exists (terminfo)){
				path = TryTermInfoDir (terminfo, term);
				if (path != null)
					return path;
			}
				    
			foreach (string dir in locations) {
				if (!Directory.Exists (dir))
					continue;

				path = TryTermInfoDir (dir, term);
				if (path != null)
					return path;
			}

			return null;
		}