-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5225 from XiangRongLin/extract_settings_import
Extract settings import
- Loading branch information
Showing
9 changed files
with
268 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
app/src/main/java/org/schabi/newpipe/settings/NewPipeFileLocator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.schabi.newpipe.settings | ||
|
||
import java.io.File | ||
|
||
/** | ||
* Locates specific files of NewPipe based on the home directory of the app. | ||
*/ | ||
class NewPipeFileLocator(private val homeDir: File) { | ||
|
||
val dbDir by lazy { File(homeDir, "/databases") } | ||
|
||
val db by lazy { File(homeDir, "/databases/newpipe.db") } | ||
|
||
val dbJournal by lazy { File(homeDir, "/databases/newpipe.db-journal") } | ||
|
||
val dbShm by lazy { File(homeDir, "/databases/newpipe.db-shm") } | ||
|
||
val dbWal by lazy { File(homeDir, "/databases/newpipe.db-wal") } | ||
|
||
val settings by lazy { File(homeDir, "/databases/newpipe.settings") } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.