Skip to content

Commit

Permalink
Change signature of listEverythingInQuad() from ArrayList to List
Browse files Browse the repository at this point in the history
  • Loading branch information
sayantan-kgp committed Apr 22, 2021
1 parent 42a53ff commit 2288792
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/balti/filex/FileX.kt
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,8 @@ abstract class FileX internal constructor(val isTraditional: Boolean) {
override fun accept(dir: FileX, name: String): Boolean = filter(dir, name)
})

abstract fun listEverythingInQuad(): ArrayList<Quad<String, Boolean, Long, Long>>?
abstract fun listEverything(): Quad<List<String>, List<Boolean>, List<Long>, List<Long>>?
abstract fun listEverythingInQuad(): List<Quad<String, Boolean, Long, Long>>?

//
// Operations
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/balti/filex/filex11/FileX11.kt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ internal class FileX11(path: String, currentRootUri: Uri? = null): FileX(false),
override fun list() = Filter.list()
override fun list(filter: FileXFilter): Array<String>? = Filter.list(filter)
override fun list(filter: FileXNameFilter): Array<String>? = Filter.list(filter)
override fun listEverythingInQuad(): ArrayList<Quad<String, Boolean, Long, Long>>? = Filter.listEverythingInQuad()
override fun listEverythingInQuad(): List<Quad<String, Boolean, Long, Long>>? = Filter.listEverythingInQuad()
override fun listEverything(): Quad<List<String>, List<Boolean>, List<Long>, List<Long>>? = Filter.listEverything()

private val Operations = Operations(this)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/balti/filex/filex11/operators/Filter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal class Filter(private val f: FileX11) {

fun list(): Array<String>? = list(null)

fun listEverythingInQuad(): ArrayList<Quad<String, Boolean, Long, Long>>? = f.run {
fun listEverythingInQuad(): List<Quad<String, Boolean, Long, Long>>? = f.run {
val results = ArrayList<Quad<String, Boolean, Long, Long>>(0)

if (!this.isDirectory || documentId == null) return null
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/balti/filex/filexTraditional/FileXT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ internal class FileXT(path: String): FileX(false) {
override fun list() = Filter.list()
override fun list(filter: FileXFilter): Array<String>? = Filter.list(filter)
override fun list(filter: FileXNameFilter): Array<String>? = Filter.list(filter)
override fun listEverythingInQuad(): ArrayList<Quad<String, Boolean, Long, Long>>? = Filter.listEverythingInQuad()
override fun listEverythingInQuad(): List<Quad<String, Boolean, Long, Long>>? = Filter.listEverythingInQuad()
override fun listEverything(): Quad<List<String>, List<Boolean>, List<Long>, List<Long>>? = Filter.listEverything()

override fun inputStream(): InputStream = file.inputStream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class Filter(private val f: FileXT) {

fun list(): Array<String>? = f.file.list()

fun listEverythingInQuad(): ArrayList<Quad<String, Boolean, Long, Long>>? = f.run {
fun listEverythingInQuad(): List<Quad<String, Boolean, Long, Long>>? = f.run {
val results = ArrayList<Quad<String, Boolean, Long, Long>>(0)

f.file.listFiles()?.forEach {
Expand Down

0 comments on commit 2288792

Please sign in to comment.