wouterdoeland
03/03/2018, 7:31 PMforEach
loop when you have multiple of such loops? For example:
directories.forEach {
var currentFile = it
urlPieces.forEach {
if(currentFile.isDirectory) {
} else if(currentFile.nameWithoutExtension == urlPieces.last()) {
documents.add(currentFile)
} else {
return@forEach
}
}
}
How could I make sure to only return to the second forEach and not the first one?