Skip to content

Instantly share code, notes, and snippets.

@DavidPiper94
Created October 24, 2022 04:51
Show Gist options
  • Save DavidPiper94/25925c2c106da23b995938fe8e9fdfaa to your computer and use it in GitHub Desktop.
Save DavidPiper94/25925c2c106da23b995938fe8e9fdfaa to your computer and use it in GitHub Desktop.
Example code for article about ArgumentParser - Run Method
mutating func run() throws {
// 1
let filePathWithExtension = "\(filePath)\(fileExtension)"
// 2
try? note.write(toFile: filePathWithExtension, atomically: true, encoding: .utf8)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment