X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3d6d097f42128bde90b7bc184057a84e99ea3e0a..649d52a70fd75e255437deb1798fa9f09697b78c:/sdk/R/R/CollectionTree.R diff --git a/sdk/R/R/CollectionTree.R b/sdk/R/R/CollectionTree.R index 91e4ec8645..8b2f8876b0 100644 --- a/sdk/R/R/CollectionTree.R +++ b/sdk/R/R/CollectionTree.R @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + source("./R/Subcollection.R") source("./R/ArvadosFile.R") source("./R/util.R") @@ -15,7 +19,7 @@ CollectionTree <- R6::R6Class( treeBranches <- sapply(fileContent, function(filePath) { splitPath <- unlist(strsplit(filePath, "/", fixed = TRUE)) - branch <- private$createBranch(splitPath) + branch <- private$createBranch(splitPath) }) root <- Subcollection$new("") @@ -76,7 +80,7 @@ CollectionTree <- R6::R6Class( branch <- newFolder } } - + branch }, @@ -90,10 +94,10 @@ CollectionTree <- R6::R6Class( } else { - # Note: REST always returns folder name alone before other folder + # 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 + # 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)) {