Temp File API Update

Refactoring & implemented automatic decompiler cleanup flag
This commit is contained in:
Konloch 2024-10-02 18:42:21 -06:00
parent ed59212c6f
commit 5bac732ea9

AI 샘플 코드 생성 중입니다

Loading...
2 changed files with 7 additions and 2 deletions

View File

@ -111,7 +111,7 @@ public class FernFlowerDecompiler extends AbstractDecompiler
{
//cleanup temp files
if(tempFile != null)
tempFile.delete();
tempFile.cleanup();
}
return FERNFLOWER + " " + ERROR + "! " + ExceptionUI.SEND_STACKTRACE_TO + NL + NL

View File

@ -1,5 +1,7 @@
package the.bytecode.club.bytecodeviewer.util;
import the.bytecode.club.bytecodeviewer.Constants;
import java.io.File;
import java.util.HashSet;
@ -59,8 +61,11 @@ public class TempFile
createdFilePaths.add(file.getAbsolutePath());
}
public void delete()
public void cleanup()
{
if(!Constants.DECOMPILERS_AUTOMATICALLY_CLEANUP)
return;
//delete all the items
for(String path : createdFilePaths)
{