You need to understand that your App service and function have different hosting, so you cannot access your file through the file system.
What you could do is to download the script using FTP/FTPs
Or expose this script with function's http endpoint so you can download it.