mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Utility to clear folder recursively
This commit is contained in:
parent
d6eced6e3c
commit
27021d447e
1 changed files with 10 additions and 0 deletions
|
|
@ -136,4 +136,14 @@ import linphonesw
|
|||
}
|
||||
}
|
||||
|
||||
@objc public class func deleteRecurse(appGroupName:String) {
|
||||
let fileManager = FileManager.default
|
||||
do {
|
||||
let fileURLs = try fileManager.contentsOfDirectory(at: FileUtil.sharedContainerUrl(appGroupName: appGroupName), includingPropertiesForKeys: nil)
|
||||
fileURLs.forEach{delete(path: $0.absoluteURL.path)}
|
||||
} catch {
|
||||
Log.e("Error while enumerating files \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue