Package jenkins.util.io
Class FileBoolean
java.lang.Object
jenkins.util.io.FileBoolean
Uses a presence/absence of a file as a persisted boolean storage.
This is convenient when you need to store just a few bits of infrequently accessed information as you can forget the explicit persistence of it. This class masks I/O problem, so if the persistence fails, you'll get no error report.
- Since:
- 1.498
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
FileBoolean
-
FileBoolean
-
-
Method Details
-
get
public boolean get()Gets the current state. True if the file exists, false if it doesn't. -
fastGet
public boolean fastGet() -
isOn
public boolean isOn() -
isOff
public boolean isOff() -
set
public void set(boolean b) -
on
public void on() -
off
public void off()
-