X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3a6a89199e2478454905731ccef0868d5fdd6f8f..cc572d714646b424d70facff4feb6d36480e8f7c:/sdk/R/R/CollectionTree.R diff --git a/sdk/R/R/CollectionTree.R b/sdk/R/R/CollectionTree.R index 40cedef6b6..91e4ec8645 100644 --- a/sdk/R/R/CollectionTree.R +++ b/sdk/R/R/CollectionTree.R @@ -2,12 +2,6 @@ source("./R/Subcollection.R") source("./R/ArvadosFile.R") source("./R/util.R") -#' Arvados Collection Object -#' -#' Update description -#' -#' @examples arv = Collection$new(api, uuid) -#' @export CollectionTree CollectionTree <- R6::R6Class( "CollectionTree", public = list( @@ -96,6 +90,11 @@ CollectionTree <- R6::R6Class( } else { + # Note: REST always returns folder name alone before other folder + # content, so in first iteration we don't know if it's a file + # or folder since its just a name, so we assume it's a file. + # If we encounter that same name again we know + # it's a folder so we need to replace ArvadosFile with Subcollection. if("ArvadosFile" %in% class(child)) { child = private$replaceFileWithSubcollection(child)