/// <summary> /// Saves all User preferences to the specified file. /// </summary> /// <param name="filename">Required. The name of the file to which preferences are saved. May not be null.</param> static public void Save(string filename) { if (string.IsNullOrEmpty(filename)) { throw new ArgumentNullException("filename"); } PrefService.SavePrefFile((nsIFile)Xpcom.NewNativeLocalFile(filename)); }
/// <summary> /// Reads all User preferences from the specified file. /// </summary> /// <param name="filename">Required. The name of the file from which preferences are read. May not be null.</param> static public void Load(string filename) { if (string.IsNullOrEmpty(filename)) { throw new ArgumentNullException("filename"); } else if (!File.Exists(filename)) { throw new FileNotFoundException(); } PrefService.ReadUserPrefs((nsIFile)Xpcom.NewNativeLocalFile(filename)); }
public void ImportCookies(string filename) { _cookieManager.ImportCookies((nsIFile)Xpcom.NewNativeLocalFile(filename)); }