LispWorks User Guide and Reference Manual > 40 The SYSTEM Package

NextPrevUpTopContentsIndex

copy-preferences-from-older-version

Function
Summary

Copies uses preferences.

Package

system

Signature

copy-preferences-from-older-version old-path new-path &optional flag-name

Arguments

old-path

A preference path.

new-path

A preference path.

flag-name

A string.

Description

The function copy-preferences-from-older-version copies uses preferences from one part of the registry to another.

old-path and new-path are the paths of preferences for the old and the new version, corresponding to the paths that were passed to (setf product-registry-path ) .

flag-name is a name of the flag to use to record in the registry that the copy is already done. flag-name must be a valid registry value name on Microsoft Windows, and a valid filename on all other platforms. The default value of flag-name is the string "copied-old-preferences" .

copy-preferences-from-older-version performs several checks:

  1. It checks if it already copied to new-path in the current session, and if so does nothing.
  2. It checks if the flag-name entry exists, and if so it does nothing.
  3. It checks if another call to copy-preferences-from-older-version is already executing (in another thread), and if so it just waits for the other call to finish.

Then if all the checks above indicate that copying is still needed, copy-preferences-from-older-version copies the values from the tree below old-path to a tree below new-path . It traverses the entire tree below old-path , and checks each key to see if it has any values.

For a key that has values, it checks if the key exists under new-path , and if the key exists it does not copy any of the values for this key, though it still traverses and maybe copies its subkeys. If the key does not exist under new-path , it creates the key and copies the values.

Because it makes checks before doing any work, copy-preferences-from-older-version is an inexpensive call that can be used freely.

See also

product-registry-path
user-preference


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex