• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
getting a nsurl file size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting a nsurl file size


  • Subject: getting a nsurl file size
  • From: Eric Smith <email@hidden>
  • Date: Sat, 28 Jan 2012 21:53:03 -0800

All,

I'm trying to determine the size of a file on a server.  If I send the following message to an NSURL named "path", I get:

[path getResourceValue:&value forKey:@"content-length" error:&error];

value comes back nil.  If I send:

value = [path propertyForKey:@"content-length"];

which is deprecated, I get the correct file size.  What is the proper way to get a file size for a file specified with a web address?

Thanks,
Eric

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: getting a nsurl file size
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Key Value Observing of NSMutableArray inside an object
  • Next by Date: Re: CoreData, and design of document model
  • Previous by thread: Re: Is NSRuleEditor worth the learning curve?
  • Next by thread: Re: getting a nsurl file size
  • Index(es):
    • Date
    • Thread