pub fn move_and_async_delete_path(path: impl AsRef<Path>)
Expand description
Delete directories/files asynchronously to avoid blocking on it. First, in sync context, check if the original path exists, if it does, rename the original path to *_to_be_deleted. If there’s an in-progress deleting thread for this path, return. Then spawn a thread to delete the renamed path.