简体   繁体   中英

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

I have a query regarding the directory returned from Path.GetTempPath() function.

It returns "C:\\Documents and Settings\\USER\\Local Settings\\Temp" as the directory.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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