public Save ( [ path, [ passphrase = null ) : void | ||
path | [ | The file to save in. |
passphrase | [ | The passphrase to use to unlock the secret key; can be |
return | void |
/// <summary> /// Saves feed to an XML file, adds the default stylesheet and signs it with <see cref="Publish.SignedFeed.SecretKey"/> (if specified). /// </summary> /// <remarks>Writing and signing the feed file are performed as an atomic operation (i.e. if signing fails an existing file remains unchanged).</remarks> /// <param name="path">The file to save to.</param> /// <exception cref="IOException">A problem occurred while writing the file.</exception> /// <exception cref="UnauthorizedAccessException">Write access to the file is not permitted.</exception> /// <exception cref="KeyNotFoundException">The specified <see cref="Publish.SignedFeed.SecretKey"/> could not be found on the system.</exception> /// <exception cref="WrongPassphraseException"><see cref="Passphrase"/> was incorrect.</exception> public override void Save(string path) { SignedFeed.Save(path, Passphrase); Path = path; ClearUndo(); }
/// <summary> /// Saves <see cref="Feed"/> to an XML file, adds the default stylesheet and signs it with <see cref="Publish.SignedFeed.SecretKey"/> (if specified). /// </summary> /// <remarks>Writing and signing the feed file are performed as an atomic operation (i.e. if signing fails an existing file remains unchanged).</remarks> /// <param name="path">The file to save in.</param> /// <exception cref="IOException">A problem occurs while writing the file.</exception> /// <exception cref="UnauthorizedAccessException">Write access to the file is not permitted.</exception> /// <exception cref="KeyNotFoundException">The specified <see cref="Publish.SignedFeed.SecretKey"/> could not be found on the system.</exception> /// <exception cref="WrongPassphraseException"><see cref="Passphrase"/> was incorrect.</exception> public void Save([NotNull] string path) { SignedFeed.Save(path, Passphrase); Path = path; Reset(); }