Method: Keybox::Storage::Container#load_from_file
- Defined in:
- lib/keybox/storage/container.rb
#load_from_file ⇒ Object
load from file, if this is successful then replace the existing member fields on this instance with the data from the file
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/keybox/storage/container.rb', line 116 def load_from_file return false unless File.exists?(@path) return false unless tmp = YAML.load_file(@path) @creation_time = tmp.creation_time @modification_time = tmp.modification_time @last_access_time = tmp.last_access_time @data_members = tmp.data_members @uuid = tmp.uuid validate_passphrase decrypt_records validate_decryption load_records @modified = false true end |