mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
8 lines
216 B
Python
8 lines
216 B
Python
|
|
import asyncio
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
|
||
|
|
async def write_bytes(path: str, content: bytes) -> None:
|
||
|
|
"""Write bytes without blocking the event loop."""
|
||
|
|
await asyncio.to_thread(Path(path).write_bytes, content)
|