• 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: Calculating file size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calculating file size


  • Subject: Re: Calculating file size
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Mon, 28 Apr 2008 11:27:42 +0200


On 28 Apr 2008, at 07:44, email@hidden wrote:


Others have answered with good suggestions for other APIs, but I will point out for the record that you can do it in Cocoa, too, because the file system has a path-based mechanism in which "..namedfork/rsrc" is appended to the path. For example, in Terminal:

$ ls -li Documents//Example.doc
108 -rw-r--r--@ 1 aburgh  aburgh  23552 Apr 27  2006 Documents/
Example.doc

$ ls  -li Documents/Example.doc/..namedfork/rsrc
108 -rw-r--r--  1 aburgh  aburgh  286 Apr 27  2006 Documents/
Example.doc/..namedfork/rsrc

Notice that the "inode" is the same (the Catalog Node ID on HFS+), but
size reflects the different forks.  You can use this technique from
any program that lets you specify a path, such as command line
utilities, and you can even read and write the contents of the forks
this way.  This is documented in the Mac OS X system documentation.

Where exactly?
I have found a mention of "namedfork" in man RezWack and some #defines in /usr/include/sys/paths.h - but no other documentation.



Kind regards,

Gerriet.

_______________________________________________

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: Calculating file size
      • From: Aaron Burghardt <email@hidden>
    • Re: Calculating file size
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: Leopard on PPC
  • Next by Date: autosizing problem
  • Previous by thread: Re: Calculating file size
  • Next by thread: Re: Calculating file size
  • Index(es):
    • Date
    • Thread