• 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
NSFileHFSTypeCode = 'brok'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFileHFSTypeCode = 'brok'


  • Subject: NSFileHFSTypeCode = 'brok'
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 17 Feb 2007 09:53:53 +0700

Sample code form Apple has a file .../SerialPortSample/ SerialPortSample.app/Contents/Info.plist with an NSFileHFSTypeCode = 'brok' and Finder behaves very strange with it: cannot Create Archive (of containing folder), Duplicate, Make Alias, Paste, move by dragging, put into Trash, rename.
There Info panels shown are misleading.


So I made a small Cocoa application to create files with different NSFileHFSTypeCodes and it seems that 'brok' truly confuses Finder.

/System/Library/Frameworks/CoreServices.framework/Versions/A/ Frameworks/CarbonCore.framework/Versions/A/Headers/Finder.h documents some HFSTypeCodes, but not 'brok'.

1. Question: Where are these type codes documented?

mdls  fileWithBrok  returns (among others):
kMDItemFSTypeCode  = 1651666795 (= 0x62726F6b = 'brok')
kMDItemID = 86323

mdfind "kMDItemID == 86323" works ok, but
mdfind "kMDItemFSTypeCode == 1651666795" does not (thinks a few seconds, then returns nothing).
Neither kMDItemID nor kMDItemFSTypeCode is documented in: /System/ Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ Metadata.framework/Versions/A/Headers/MDItem.h


2. Question: How to make mdfind work, and where is a complete list of kMDxxx to be found?

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: NSFileHFSTypeCode = 'brok'
      • From: Scott Anguish <email@hidden>
    • Re: NSFileHFSTypeCode = 'brok'
      • From: Paul Kim <email@hidden>
  • Prev by Date: Core data crashing while loading
  • Next by Date: Re: NSFileHFSTypeCode = 'brok'
  • Previous by thread: Core data crashing while loading
  • Next by thread: Re: NSFileHFSTypeCode = 'brok'
  • Index(es):
    • Date
    • Thread