Skip to content

Instantly share code, notes, and snippets.

@daanta-real
Created June 29, 2022 15:50
Show Gist options
  • Save daanta-real/2f4d3f8d0accd3b47bb166357be9b9b6 to your computer and use it in GitHub Desktop.
Save daanta-real/2f4d3f8d0accd3b47bb166357be9b9b6 to your computer and use it in GitHub Desktop.
Open a file and read inner T/F value
import java.io.File;
import java.util.Scanner;
public class Debug {
// 디버그용 로그인여부 지시 파일 내용이 true인지 아닌지,
// 즉 강제 로그인을 지시했는지 아닌지를 알아내어 회신
// Open a file which indicates about the debug mode,
// get the debug mode is true or not, and return it
public static boolean getDebug() {
try(Scanner obj = new Scanner(new File("C:/isDebugMode.ini"))) {
String result = obj.nextLine();
return result.equals("true") ? true : false;
} catch(Exception e) { e.printStackTrace(); }
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment