File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
hash-utils/src/main/java/net/minecraftforge/util/hash Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public class HashStore {
2828 private final Map <String , String > oldHashes = new HashMap <>();
2929 private final Map <String , String > newHashes = new HashMap <>();
3030 private @ Nullable File target ;
31+ private boolean saved ;
3132
3233 public static HashStore fromFile (File path ) {
3334 File parent = path .getAbsoluteFile ().getParentFile ();
@@ -106,6 +107,10 @@ public HashStore load(File file) {
106107 return this ;
107108 }
108109
110+ public boolean isLoaded () {
111+ return this .target != null ;
112+ }
113+
109114 public boolean exists () {
110115 return this .target != null && this .target .exists ();
111116 }
@@ -193,11 +198,16 @@ public void save(File file) {
193198
194199 try {
195200 Files .write (file .toPath (), buf .toString ().getBytes (StandardCharsets .UTF_8 ));
201+ this .saved = true ;
196202 } catch (IOException e ) {
197203 sneak (e );
198204 }
199205 }
200206
207+ public boolean isSaved () {
208+ return this .saved ;
209+ }
210+
201211 private String getPath (File file ) {
202212 String path = file .getAbsolutePath ();
203213
You can’t perform that action at this time.
0 commit comments