如何使用c#在本地系统中创建临时文件夹

Nee*_*n K 3 c# sharepoint-2013

我想在本地系统中创建一个临时文件夹,并将文件作为 ZIP 上传到该特定文件夹中。

注意:文件路径是从 SharePoint 文档库获取的

提前致谢

Vác*_*hár 6

这将创建一个临时目录:

   string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
   Directory.CreateDirectory(tempDirectory);
Run Code Online (Sandbox Code Playgroud)