Skybound.Gecko.XULRunnerLocator.GetXULRunnerLocation C# (CSharp) Method

GetXULRunnerLocation() public static method

public static GetXULRunnerLocation ( ) : string
return string
        public static string GetXULRunnerLocation()
        {
            if (!Xpcom.IsLinux)
                throw new ApplicationException("XULRunnerLocator only works on Linux.");

            if (!Directory.Exists("/usr/lib"))
                throw new ApplicationException("/usr/lib doesn't exist");

            DirectoryInfo d = new DirectoryInfo("/usr/lib");
            DirectoryInfo[] dirs = d.GetDirectories("xulrunner-2.0", SearchOption.TopDirectoryOnly);

            if (dirs.Length == 0)
                return null;

            return dirs.OrderBy(x => x.Name).Last().FullName;
        }
XULRunnerLocator