Skip to content
Permalink
Browse files

Issue #50: Make FlatFileExperimentStorage receive a File

Closes #50: Make FlatFileExperimentStorage receive a File
  • Loading branch information...
fercarcedo committed Jul 14, 2018
1 parent 3adeb6c commit 2e5103b1984156ad5cf8b3011813894dd25f516f
@@ -8,8 +8,11 @@ import android.util.AtomicFile
import mozilla.components.service.fretboard.Experiment
import mozilla.components.service.fretboard.ExperimentStorage
import java.io.FileNotFoundException
import java.io.File

class FlatFileExperimentStorage(file: File) : ExperimentStorage {
private val atomicFile: AtomicFile = AtomicFile(file)

class FlatFileExperimentStorage(private val atomicFile: AtomicFile) : ExperimentStorage {
override fun retrieve(): List<Experiment> {
try {
val experimentsJson = String(atomicFile.readFully())

0 comments on commit 2e5103b

Please sign in to comment.
You can’t perform that action at this time.