On Oct 8, 2009, at 6:37 PM, I. Savant wrote:

On Oct 8, 2009, at 7:24 PM, Maggie Zhang wrote:

Does anyone know if it's possible to programmatically hide an single item
(e.g. a file or a mounted disk or a directory) from the Desktop?

 Rename it so that it starts with a period. "Dot-files" are hidden.

Well, there's also the hidden bit in the file's metadata. It's accessible a number of ways:

chflags(2) with UF_HIDDEN

The kIsInvisible flag of the finderFlags field of the FileInfo and FolderInfo, settable with FSSetCatalogInfo.

The command: /Developer/Tool/SetFile -a V <path>

setattrlist(2) via either ATTR_CMN_FLAGS (analogous to chflags) or ATTR_CMN_FNDRINFO (analogous to FSSetCatalogInfo).

Etc.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to