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:
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 whether 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.
LispWorks User Guide and Reference Manual - 13 Feb 2015