• 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: Getting File Sizes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting File Sizes


  • Subject: Re: Getting File Sizes
  • From: email@hidden
  • Date: Sat, 4 May 2002 16:36:02 -0700

unsigned long long fileSize = [[[NSFileManager defaultManager] fileAttributesAtPath:yourPathHere traverseLink:NO] fileSize];

On Saturday, May 4, 2002, at 04:15 PM, Nathan Zamecnik wrote:

Hello, I haven't seen this answered around here yet. I have a class I made
that uses some NSFileHandle things among other things that will take a root
directory and parse from that directory through every other directory
beneath it and return all the directories file contents. I wan wondering
how you get Cocoa to return not only the file names in a directory but also
the file size. Sort of like the shell command:
ls -s
Which will show the contents and the size in bytes. Anyone able to help.
And while I'm on the topic, is there a way to execute commands and inside
your program and have it return the results?
Thanc
-- NAteZ
_______________________________________________
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: 
 >Getting File Sizes (From: Nathan Zamecnik <email@hidden>)

  • Prev by Date: Getting File Sizes
  • Next by Date: Re: Categories
  • Previous by thread: Getting File Sizes
  • Next by thread: Re: eps not drawing properly
  • Index(es):
    • Date
    • Thread