• 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
Re: file sizes from NSFileManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file sizes from NSFileManager


  • Subject: Re: file sizes from NSFileManager
  • From: Greg Hulands <email@hidden>
  • Date: Wed, 08 Oct 2003 13:47:51 +1000

b->kb->mb

don't divide by 8, that is bits->bytes.

b/ (1024*1024)

On Wednesday, October 8, 2003, at 01:13 PM, April Gendill wrote:

I don't understand how to obtain the file size from NSFileManager. I
get the dictionary and it has the file size key. The particular folder
I have been testing with is 12 megs . The dictionary key returns
15008530432 which is bytes. Now I must have my math off because I
thought megs was b / 8 / 1024 /1024.
The first problem I've has is that when I try to use nsvalue to extract
an unsigned long long the compiler tells me NSString does not respond
to unsignedLongLongValue. The only thing other than float, and int that
I can extract is a double. All of which gives me this number:
2123628544 which is so completely not even close to the number returned
in the dictionary. So.. Since I cannot pass the number in bytes because
it simply does not work for some reason I cannot fathom, how can I get
this byte number into a number I can break down to it's kilobyte or
megabyte size?

Thanks April.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >file sizes from NSFileManager (From: April Gendill <email@hidden>)

  • Prev by Date: Re: file sizes from NSFileManager
  • Next by Date: Re: actions across nibs
  • Previous by thread: Re: file sizes from NSFileManager
  • Next by thread: actions across nibs
  • Index(es):
    • Date
    • Thread