But since we’re here, I use an SSH server app worth about $3 on my phone to access it from other devices with an SFTP or SSHFS client. The app is literally called “SSH Server”. Once the server is active I can use an app like Solid Explorer (free with ads or paying for a license) on another Android device to connect to my phone on the same Wi-Fi network. Or from Windows I can just map a network drive using the format \sshfs\user@ip. And on Linux just find the “Connect to server” option in your favorite file explorer to use SSHFS. Or any SFTP client of your choice.
I’m not familiar with Wi-Fi Direct since I’ve been using SSH for years now, and certainly much more work this way, but it works okay across all my devices.