Last active
April 13, 2023 18:27
-
-
Save zmwangx/c76ce710fbca1bea7a53a55d69211861 to your computer and use it in GitHub Desktop.
Revisions
-
zmwangx revised this gist
Apr 13, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ When a file is being copied in on macOS, the `com.apple.FinderInfo` xattr is set 627a7920 00000000 00000000 00000000 00000000 00000000 00000000 00000000 which would show up as `bzy ` with `xattr -p com.apple.FinderInfo /path/to/file`. (This may only be true when there are no additional attributes likes flags.) This can be used to test whether a file copy has completed. Conversely, one can also use -
zmwangx created this gist
Apr 13, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ When a file is being copied in on macOS, the `com.apple.FinderInfo` xattr is set to the 32-byte value 627a7920 00000000 00000000 00000000 00000000 00000000 00000000 00000000 which would show up as `bzy` with `xattr -p com.apple.FinderInfo /path/to/file`. (This may only be true when there are no additional attributes likes flags.) This can be used to test whether a file copy has completed. Conversely, one can also use ```command xattr -wx com.apple.FinderInfo '627a7920 00000000 00000000 00000000 00000000 00000000 00000000 00000000' /path/to/file ``` to emulate the in-progress visual when writing a file.