swift file size from url code example
Example: swift file size from url
do {
let resources = try url.resourceValues(forKeys:[.fileSizeKey])
let fileSize = resources.fileSize!
print ("\(fileSize)")
} catch {
print("Error: \(error)")
}