File business
In Mac OS X v10.4 and later:
Finder and data integrity
Whilst Finder progresses a copy of a file (not afterwards) the copy has:
- HFS type code
brok
- HFS creator code
MACS
— together, those two things signify file business.
MACS
is the ID of Finder.
If the copy is to a file system without support for attributes such as those
Whilst Finder progresses a copy of a file (not afterwards) the copy has a counterpart:
- a dot underscore
._
file that includes the necessary extended attribute (xattr).
Related
Why are dot underscore ._ files created, and how can I avoid them? — Ask Different
Finder compatibility with a broad range of file systems and operating systems
If a copy using Finder is interrupted ungracefully, then the presence of brok
MACS
should ensure that breakage/business is recognisable to:
- all versions of OS X
- all versions of Mac OS X
- Mac OS 9 and some earlier classic versions of the operating system.
Example
A file big file.dmg
with no extended attribute.
Before copying from JHFS+ to an empty example
directory on a volume that uses MS-DOS (FAT32):
[macbookpro08:~] gjp22% date
Fri 11 May 2012 17:24:29 BST
[macbookpro08:~] gjp22% ls -h@al /Users/gjp22/Documents/uk/ac/brighton/collaborate/bigfile.dmg
-rw-r--r-- 1 gjp22 staff 1.4G 11 May 17:20 /Users/gjp22/Documents/uk/ac/brighton/collaborate/bigfile.dmg
[macbookpro08:~] gjp22% xattr /Users/gjp22/Documents/uk/ac/brighton/collaborate/bigfile.dmg
[macbookpro08:~] gjp22% diskutil list | grep FAT32
1: DOS_FAT_32 FAT32 2.0 GB disk3s1
[macbookpro08:~] gjp22% ls -h@al /Volumes/FAT32/example
total 16
drwxrwxrwx 1 gjp22 staff 4.0K 11 May 17:24 .
drwxrwxrwx 1 gjp22 staff 4.0K 11 May 11:32 ..
After using Finder to begin the copy, before completion
brokMACS
within the value of extended attribute com.apple.FinderInfo
:
[macbookpro08:~] gjp22% date
Fri 11 May 2012 17:25:08 BST
[macbookpro08:~] gjp22% ls -h@al /Volumes/FAT32/example
total 311320
drwxrwxrwx 1 gjp22 staff 4.0K 11 May 17:25 .
drwxrwxrwx 1 gjp22 staff 4.0K 11 May 11:32 ..
-rwxrwxrwx 1 gjp22 staff 4.0K 11 May 17:25 ._bigfile.dmg
-rwxrwxrwx@ 1 gjp22 staff 152M 11 May 17:25 bigfile.dmg
com.apple.FinderInfo 32B
[macbookpro08:~] gjp22% xattr -l /Volumes/FAT32/example/bigfile.dmg
com.apple.FinderInfo:
00000000 62 72 6F 6B 4D 41 43 53 00 00 00 00 00 00 00 00 |brokMACS........|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020
After Finder successfully completes the copy
That extended attribute is removed:
[macbookpro08:~] gjp22% date
Fri 11 May 2012 17:29:19 BST
[macbookpro08:~] gjp22% xattr -l /Volumes/FAT32/example/bigfile.dmg
[macbookpro08:~] gjp22% ls -h@al /Volumes/FAT32/example
total 3000016
drwxrwxrwx 1 gjp22 staff 4.0K 11 May 17:29 .
drwxrwxrwx 1 gjp22 staff 4.0K 11 May 11:32 ..
-rwxrwxrwx 1 gjp22 staff 1.4G 11 May 17:20 bigfile.dmg