Thanks for reaching out to Q&A.
Every Azure Web App has a home directory stored/backed by Azure Storage. This network share is where applications store their content. This directory is available for the sandbox with read/write access. The file directory is either D:\ or C:\ , you can check this by opening the Kudu site of the function app (site is not available for Linux consumption app)
Functions Sandbox restrictions : https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#file-system-restrictionsconsiderations
You should be able to write the files to the site folder directory (in my case D:\Home\Site\wwwroot) however its not recommended to write files in this directory. I would strongly recommend you to write the files to a storage account either using Storage SDK or functions storage output binding
I hope this helps!
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.