Created
March 26, 2021 19:59
-
-
Save giovani-pereira-ifood/7e74fdb31a3c2c99c74c771691f039aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func record(file: [IconData]) throws { | |
// Create the JSON | |
let data = try JSONEncoder().encode(file) | |
let json = try convertToFormattedJSON(data: data) | |
// Get the file path | |
let referenceFileURL = try getReferenceFilePath() | |
// Write file | |
try json.write(to: referenceFileURL, atomically: false, encoding: .utf8) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment