【问题标题】:Problem with temporary folder location in NodeJs Azure FunctionNodeJs Azure 函数中的临时文件夹位置问题
【发布时间】:2019-12-11 12:18:42
【问题描述】:

在我的函数中,我正在向文件中写入一些内容。 我提供的文件路径是 d:/local/temp,如文档中所建议的那样。

命令成功,在我列出目录内容的同一个函数中,文件就在那里。

但是当我通过控制台或 Kudu 访问 d:/local/temp 时,它不包含我创建的内容。我可以用 'dir filename /s on D drive' 确认它

当我再次运行该函数时,我仍然可以列出所有以前生成的文件,所以他们没有去

所以 App 功能的 Kudu/console 中的 d:/local/temp 和 nodejs 代码不是同一个路径,但是我怎样才能找到我的文件的真实位置呢?

【问题讨论】:

    标签: node.js azure-functions azure-functions-core-tools


    【解决方案1】:

    请尝试为命令dir <filename> /S 添加一个附加选项/B/b 以显示文件的完整路径,如下所示。

    dir <filename> /S /B
    # the result is like D:\<full-parent-path>\filename 
    

    图 1. 查找名为 host.json 的文件并显示完整路径的示例

    【讨论】:

      猜你喜欢
      • 2022-01-08
      • 2012-08-07
      • 1970-01-01
      • 2023-03-05
      • 2014-03-05
      • 2020-05-18
      • 2022-07-21
      • 1970-01-01
      相关资源
      最近更新 更多