Using Pandoc with Swift
问题 I'm trying to use Pandoc to convert LaTeX to Markdown. I need to create a file and then run the pandoc terminal command. The problem is the file I create isn't in the same directory that I'm running the terminal commands in. I tried using shell("cd") but it doesn't move you to the user's folder. Any ideas? import Cocoa class ViewController: NSViewController { func shell(args: String...) -> Int32 { let task = NSTask() task.launchPath = "/usr/bin/env" task.arguments = args task.launch() task