ASP.NET Schedule deletion of temporary files

前端 未结 8 1203
暗喜
暗喜 2021-01-06 00:38

Question: I have an ASP.NET application which creates temporary PDF files (for the user to download). Now, many users over many days can create many PDFs, which take much di

8条回答
  •  暖寄归人
    2021-01-06 01:18

    Try using Path.GetTempPath(). It will give you a path to a windows temp folder. Then it will be up to windows to clean up :)

    You can read more about the method here http://msdn.microsoft.com/en-us/library/system.io.path.gettemppath.aspx

提交回复
热议问题