MCPcopy Create free account
hub / github.com/PowerShell/DSC / create_key

Method create_key

archive/ntreg/src/registry_key.rs:169–171  ·  view source on GitHub ↗

Creates a new sub key. # Arguments `name` - A string containing the name of the new sub key. This will fail if the sub key already exists. # Examples ``` # use ntreg::registry_key::*; let key = RegistryKey::new("HKCU").unwrap(); let new_key = key.create_key("NewKey"); assert!(new_key.is_ok()); new_key.unwrap().delete(false); ```

(&self, name: &str)

Source from the content-addressed store, hash-verified

167 /// new_key.unwrap().delete(false);
168 /// ```
169 pub fn create_key(&self, name: &str) -> Result<RegistryKey, NtStatusError> {
170 self.create_key_helper(name, true)
171 }
172
173 /// Creates or opens an existing sub key.
174 ///

Callers 3

open_or_create_keyFunction · 0.80
test_create_and_deleteFunction · 0.80

Calls 1

create_key_helperMethod · 0.80

Tested by 2

test_create_and_deleteFunction · 0.64