summaryrefslogtreecommitdiff
path: root/core/java/android/util/AtomicFile.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/util/AtomicFile.java')
-rw-r--r--core/java/android/util/AtomicFile.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/util/AtomicFile.java b/core/java/android/util/AtomicFile.java
index 2f1abe9a4c8d..0122e49eb462 100644
--- a/core/java/android/util/AtomicFile.java
+++ b/core/java/android/util/AtomicFile.java
@@ -202,6 +202,15 @@ public class AtomicFile {
}
/**
+ * @hide
+ * Checks if the original or backup file exists.
+ * @return whether the original or backup file exists.
+ */
+ public boolean exists() {
+ return mBaseName.exists() || mBackupName.exists();
+ }
+
+ /**
* Gets the last modified time of the atomic file.
* {@hide}
*