[問題] 確保能刪除檔案的方式
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
c++ windows
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
boost
問題(Question):
由於不知道檔案啥時會被產生 可能是temp檔
寫一個thread
while(1)
{
while( boost::filesystem::exists(filename))
{
try { boost::filesystem::remove(filename); } catch(...) {}
}
}
filename 是檔名
請問這種方式安全嗎?
謝謝大家
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.162.247.94
→
03/01 23:33, , 1F
03/01 23:33, 1F
不好意思是windows下 忘記說明了 sorry唷
※ 編輯: donkeychen 來自: 1.162.247.94 (03/01 23:43)
→
03/01 23:47, , 2F
03/01 23:47, 2F
→
03/01 23:47, , 3F
03/01 23:47, 3F
→
03/02 00:43, , 4F
03/02 00:43, 4F
→
03/02 01:09, , 5F
03/02 01:09, 5F