Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift file size from url

do {
    let resources = try url.resourceValues(forKeys:[.fileSizeKey])
    let fileSize = resources.fileSize!
    print ("(fileSize)")
} catch {
    print("Error: (error)")
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #swift #file #size #url
ADD COMMENT
Topic
Name
1+1 =