mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-12 12:01:29 +03:00
Feat/macos clipboard file (#10939)
* feat: macos, clipboard file Signed-off-by: fufesou <linlong1266@gmail.com> * Can't reuse file transfer Signed-off-by: fufesou <linlong1266@gmail.com> * handle paste task Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
25
libs/clipboard/src/platform/unix/macos/README.md
Normal file
25
libs/clipboard/src/platform/unix/macos/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# File pate on macOS
|
||||
|
||||
MacOS cannot use `fuse` because of [macfuse is not supported by default](https://github.com/macfuse/macfuse/wiki/Getting-Started#enabling-support-for-third-party-kernel-extensions-apple-silicon-macs).
|
||||
|
||||
1. Use a temporary file `/tmp/rustdesk_<uuid>` as a placeholder in the pasteboard.
|
||||
2. Uses `fsevent` to observe files paste operation. Then perform pasting files.
|
||||
|
||||
## Files
|
||||
|
||||
### `pasteboard_context.rs`
|
||||
|
||||
The context manager of the paste operations.
|
||||
|
||||
### `item_data_provider.rs`
|
||||
|
||||
1. Set pasteboard item.
|
||||
2. Create temp file in `/tmp/.rustdesk_*`.
|
||||
|
||||
### `paste_observer.rs`
|
||||
|
||||
Use `fsevent` to observe the paste operation with the source file `/tmp/.rustdesk_*`.
|
||||
|
||||
### `paste_task.rs`
|
||||
|
||||
Perform the paste.
|
||||
Reference in New Issue
Block a user