/// <summary> /// Saves to the shortcut file (.lnk). /// </summary> /// <exception cref="AuException">Failed to save.</exception> /// <remarks> /// Creates parent folder if need. /// </remarks> public void Save() { if (_changedHotkey && !_isOpen && filesystem.exists(_lnkPath).File) { _UnregisterHotkey(_lnkPath); } filesystem.createDirectoryFor(_lnkPath); AuException.ThrowIfHresultNot0(_ipf.Save(_lnkPath, true), "*save"); }
/// <summary> /// Saves the Shortcut variable properties to the shortcut file. /// </summary> /// <exception cref="AuException">Failed to save .lnk file.</exception> /// <remarks> /// Creates parent folder if need. /// </remarks> public void Save() { if (_changedHotkey && !_isOpen && AFile.ExistsAsFile(_lnkPath)) { _UnregisterHotkey(_lnkPath); } AFile.CreateDirectoryFor(_lnkPath); AuException.ThrowIfHresultNot0(_ipf.Save(_lnkPath, true), "*save"); }