I have an azure function that should create a folder inside which it some csv files are written.
These files are processed in further steps and then the files/folder shld be deleted.
string csvfolderPath = Path.Combine(Environment.CurrentDirectory.Split("\bin")[0], "CSVOutput");
if (!Directory.Exists(csvfolderPath))
{
Directory.CreateDirectory(csvfolderPath);
}
string folderPath = Path.Combine(csvfolderPath, CompanyName);
if (!Directory.Exists(folderPath))
{
Directory.CreateDirectory(folderPath);
}
This runs without any issue locally.
But when this azure function is deployed, it throws error saying ‘could not find the file’
Thanks,
PRI.