Skip to content

Instantly share code, notes, and snippets.

@zmwangx
Last active April 13, 2023 18:27
Show Gist options
  • Select an option

  • Save zmwangx/c76ce710fbca1bea7a53a55d69211861 to your computer and use it in GitHub Desktop.

Select an option

Save zmwangx/c76ce710fbca1bea7a53a55d69211861 to your computer and use it in GitHub Desktop.

Revisions

  1. zmwangx revised this gist Apr 13, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Finder busy xattr.md
    Original 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.
    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

  2. zmwangx created this gist Apr 13, 2023.
    13 changes: 13 additions & 0 deletions Finder busy xattr.md
    Original 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.