INNER CODE UNIT · Swift
createDirectories
gcollazo/mongodbapp · MongoDB/AppDelegate.swift:110
func createDirectories() {
if (!FileManager.default.fileExists(atPath: self.dataPath)) {
do {
try FileManager.default
.createDirectory(atPath: self.dataPath, withIntermediateDirectories: true, attributes: nil)
} catch {
print("Something went wrong creating dataPath: \(error)")
}
}
if (!FileManager.default.fileExists(atPath: self.logPath)) {
do {
try FileManager.default
.createDirectory(atPath: self.logPath, withIntermediateDirectories: true, attributes: nil)
} catch {
print("Something went wrong creating logPath: \(error)")
}
}