简体   繁体   English

何时清除Documents and Settings \ USER \ Local Settings \ Temp文件夹?

[英]When is the Documents and Settings\USER\Local Settings\Temp folder cleared?

I have a query regarding the directory returned from Path.GetTempPath() function. 我有一个关于从Path.GetTempPath()函数返回的目录的查询。

It returns "C:\\Documents and Settings\\USER\\Local Settings\\Temp" as the directory. 它返回“C:\\ Documents and Settings \\ USER \\ Local Settings \\ Temp”作为目录。

I am saving some temp files there and I am wondering when this folder is cleared, so I know how long they will exist, if it is cleared at all that is. 我在那里保存一些临时文件,我想知道这个文件夹什么时候被清除,所以我知道它们将存在多久,如果它被清除的话。

Is it every time I restart the computer? 是每次我重新启动电脑吗? or is it after a certain amount of time? 还是经过一段时间后呢? or space is used up? 还是空间用完了?

A nice easy one for someone to answer for me! 一个很好的方便有人为我回答!

Thanks 谢谢

It's never cleared (except by the user when he gets tired of all the files clogging up his machine). 它永远不会被清除(除非用户厌倦了所有文件堵塞他的机器)。 If you create a file in there, it's your responsibility to delete it once you're finished with it. 如果你在那里创建一个文件,你有责任在完成后删除它。 It is for temporary files, after all. 毕竟,这是临时文件。

It gets cleared whenever the computer gets "cleaned up". 只要计算机“清理”,它就会被清除。 This could be done a number of ways: manually by a user, through the Disk Cleanup tool, etc. 这可以通过多种方式完成:由用户手动,通过磁盘清理工具等。

只有在您清除它时才会清除它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM