Hey guys,
I need to get the file size of a MOV file from an URL in an array. It needs to be in the form of a string so I can put it in an UILabel. Is there documentation on this? Where do I start?
Where do I start?
Two things:
To get the size of a URL, call
to getURL.resourceValues(forKeys:)
,fileSize
,fileAllocatedSize
, ortotalFileSize
, depending on your specific requirements.totalFileAllocatedSizeTo format that as a string, use
.ByteCountFormatter
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"