Module: IosBackupExtractor
- Defined in:
- lib/ios_backup_extractor.rb,
lib/ios_backup_extractor/mbdb.rb,
lib/ios_backup_extractor/keybag.rb,
lib/ios_backup_extractor/version.rb,
lib/ios_backup_extractor/raw_backup.rb,
lib/ios_backup_extractor/raw_backup4.rb,
lib/ios_backup_extractor/raw_backup10.rb,
lib/ios_backup_extractor/backup_retriever.rb
Defined Under Namespace
Classes: BackupRetriever, Keybag, MBDB, RawBackup, RawBackup10, RawBackup4
Constant Summary collapse
- VERSION =
'1.2.0'
Class Method Summary collapse
-
.file_count(directory) ⇒ Object
Returns the number of files contained in
directory
. -
.plist_data_to_hash(data) ⇒ Object
TODO Move helpers somewhere else.
- .plist_file_to_hash(file) ⇒ Object
Class Method Details
.file_count(directory) ⇒ Object
Returns the number of files contained in directory
25 26 27 28 29 30 31 |
# File 'lib/ios_backup_extractor.rb', line 25 def self.file_count(directory) count = 0 Find.find(File.(directory)) do |path| count += 1 unless FileTest.directory?(path) end count end |
.plist_data_to_hash(data) ⇒ Object
TODO Move helpers somewhere else.
34 35 36 |
# File 'lib/ios_backup_extractor.rb', line 34 def self.plist_data_to_hash(data) CFPropertyList.native_types(CFPropertyList::List.new(data: data).value) end |
.plist_file_to_hash(file) ⇒ Object
38 39 40 41 |
# File 'lib/ios_backup_extractor.rb', line 38 def self.plist_file_to_hash(file) file = NauktisUtils::FileBrowser.ensure_valid_file(file) CFPropertyList.native_types(CFPropertyList::List.new(:file => file).value) end |