Skip to content
Simon Byrne edited this page Dec 3, 2016 · 3 revisions

WinReg.jl notes

Packages in other languages

Proposal

Based on the C# model, provide 2 different interfaces:

Simple interface

  • WinReg.getvalue(keypath::AbstractString, name::AbstractString): queries the key/name, throws an error if it doesn't exist.
  • WinReg.getvalue(keypath::AbstractString, name::AbstractString, default): queries the key/name, returns default if it doesn't exist
  • WinReg.setvalue!(keypath, name, value): sets value at key, creating it if it doesn't exist

RegKey interface

Uses RegKey <: Associative{String, Any} objects

  • WinReg.openkey(keypath::AbstractString; permissions=..., create=true): returns a RegKey object, using permissions, create determines whether to create it if it doesn't exist.
  • WinReg.openkey(regkey::RegKey, subkey::AbstractString): opens a subkey of key.
  • WinReg.deletesubkey!(regkey::RegKey, subkey::AbstractString)
  • WinReg.iskey(keypath) check if key exists

For a given regkey::RegKey:

  • regkey[name]: queries key/value
  • get(regkey, name, default)
  • keys(regkey) gives a KeyIterator{RegKey}, similar to EnvHash.
    • name in keys(regkey) if value with name is defined.
Clone this wiki locally