Get current directory path

 Problem

I want to get the current directory path.



 Recipe


// Create a FileManager instance

let fileManager = NSFileManager.defaultManager()

// Get current directory path

let path = fileManager.currentDirectoryPath
print(path)
				

Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)

 

 Playground