• 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
Custom icons on custom filesystem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom icons on custom filesystem


  • Subject: Custom icons on custom filesystem
  • From: Charles Francoise <email@hidden>
  • Date: Tue, 01 Jul 2014 16:13:27 +0200

Hi,

I’m currently working on a OSXFUSE-based filesystem (with heavy modifications), and I can’t seem to set custom icons on folders in this filesystem.

I tried doing it by hand (which works on an HFS+ filesystem) and I tried using -[NSWorkspace setIcon:forFile:options:] which did the exact same thing, as far as I can tell, for the same results. I also tried pasting an image in the Finder’s “Info” panel for the folder, to no avail.

Using fs_usage and logging, I can see the Finder does retrieve the com.apple.FinderInfo extended attribute for my files and uses them: I have already implemented hidden files and file/creator attributes using this xattr. But after reading the FinderInfo, it doesn’t read the "Icon\r" file needed for the custom icon.

I assume my filesystem needs to declare it supports custom icons on folders somehow. I haven’t found where this capability/attribute is located.

This is the information I can read on the folder in my mounted filesystem:

$ xattr /Volumes/MyVolume/Desktop/baz
com.apple.FinderInfo

$ GetFileInfo /Volumes/MyVolume/Desktop/baz
directory: "/Volumes/MyVolume/Desktop/baz"
attributes: avbstClinmedz
created: 01/01/1904 00:09:21
modified: 06/30/2014 11:21:06

$ xattr -p -l com.apple.FinderInfo /Volumes/MyVolume/Desktop/baz
com.apple.FinderInfo:
00000000  00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020

$ ls -al /Volumes/MyVolume/Desktop/baz       
total 720
-rwxr-xr-x@ 1 chrales  staff       0 Jun 30 11:21 Icon?
-rw-r--r--@ 1 chrales  staff  366735 Mar 26 12:01 jura.jpg

$ xattr /Volumes/MyVolume/Desktop/baz/Icon^M 
com.apple.FinderInfo
com.apple.ResourceFork

$ GetFileInfo /Volumes/MyVolume/Desktop/baz/Icon^M 
"ile: "/Volumes/MyVolume/Desktop/baz/Icon
type: "icon"
creator: "MACS"
attributes: aVbstclinmEdz
created: 01/01/1904 00:09:21
modified: 06/30/2014 11:21:06

$ xattr -p -l com.apple.FinderInfo  /Volumes/MyVolume/Desktop/baz/Icon^M 
com.apple.FinderInfo:
00000000  69 63 6F 6E 4D 41 43 53 40 10 00 00 00 00 00 00  |iconMACS@.......|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020

$ xattr -p -l com.apple.ResourceFork  /Volumes/MyVolume/Desktop/baz/Icon^M
com.apple.ResourceFork:
00000000  00 00 01 00 00 06 4E F1 00 06 4D F1 00 00 00 32  |......N...M....2|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000090  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
000000A0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
000000B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
000000D0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
000000E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
000000F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000100  00 06 4D ED 69 63 6E 73 00 06 4D ED 54 4F 43 20  |..M.icns..M.TOC |
          ...truncated...
00064EB0  04 0E 02 07 81 83 C0 2D 44 E0 2C 00 6E A1 D1 8F  |.......-D.,.n...|
00064EC0  CA 07 81 83 C0 41 E0 20 70 10 38 0B 80 E3 03 07  |.....A. p.8.....|
00064ED0  81 83 C0 41 E0 20 70 10 B8 85 08 FC 33 E9 B7 BB  |...A. p.....3...|
00064EE0  6D 36 9B 69 5D 00 00 00 00 49 45 4E 44 AE 42 60  |m6.i]....IEND.B`|
00064EF0  82 00 00 01 00 00 06 4E F1 00 06 4D F1 00 00 00  |.......N...M....|
00064F00  32 03 00 00 00 0C 00 00 00 00 1C 00 32 00 00 69  |2...........2..i|
00064F10  63 6E 73 00 00 00 0A BF B9 FF FF 00 00 00 00 01  |cns.............|
00064F20  00 00 00                                         |...|
00064f23


Am I missing something?

Thanks,
Charlie

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Custom icons on custom filesystem
  • Next by Date: Re: Finder does not see any content behind a mount point
  • Previous by thread: Custom icons on custom filesystem
  • Next by thread: Re: Finder does not see any content behind a mount point
  • Index(es):
    • Date
    • Thread