Skip to content

Instantly share code, notes, and snippets.

@Denismih
Created November 14, 2019 07:49
Show Gist options
  • Save Denismih/e4447f005ccfdf5b78aea26375833ae0 to your computer and use it in GitHub Desktop.
Save Denismih/e4447f005ccfdf5b78aea26375833ae0 to your computer and use it in GitHub Desktop.
func createProjectDirectoryPath(path:String) -> String
{
let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: Constants.Notifications.appGroupIdentifier)
let logsPath = containerURL!.appendingPathComponent(path)
//print(logsPath.path);
do {
try FileManager.default.createDirectory(atPath: logsPath.path, withIntermediateDirectories: true, attributes: nil)
} catch let error as NSError {
print("Unable to create directory \(error.debugDescription)")
}
return logsPath.path
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment