如何保存在lambda temp文件夹中?为了能够从lambda temp文件夹中保存并获取文件。
答案 0 :(得分:1)
您可以像写入其他任何文件夹一样写入temp文件夹。临时文件夹位于/ tmp
以下是执行此操作的示例代码段
// Example #1: Write an array of strings to a file.
// Create a string array that consists of three lines.
string[] lines = { "First line", "Second line", "Third line" };
// WriteAllLines creates a file, writes a collection of strings to the file,
// and then closes the file. You do NOT need to call Flush() or Close().
System.IO.File.WriteAllLines(@"/tmp/someText.txt", lines);