Set (value a string) or clear (value undefined) one key in one scope, and report whether the
file changed. The write holds the preferences lock, refuses with CONFLICT when the file is no
longer at expectedRevision, and replaces the file atomically, so a concurrent edit is never lost.
A folder another local account could write refuses it with PERMISSION_DENIED before anything is
written (see assertPreferencesFolderProtected).
The new file is private (0600); replacedMode is the old file's mode when it was another, such as
a read-only 0400, so the caller can say the mode changed.
Set (
valuea string) or clear (valueundefined) one key in one scope, and report whether the file changed. The write holds the preferences lock, refuses withCONFLICTwhen the file is no longer atexpectedRevision, and replaces the file atomically, so a concurrent edit is never lost. A folder another local account could write refuses it withPERMISSION_DENIEDbefore anything is written (see assertPreferencesFolderProtected). The new file is private (0600);replacedModeis the old file's mode when it was another, such as a read-only0400, so the caller can say the mode changed.