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)
				


 Playground

Find answers here

Hi there! Ask Us a Question We are ready to help