Added feature to create new file in a particular collection.
[arvados.git] / sdk / R / R / Subcollection.R
1 #' Arvados SubCollection Object
2 #'
3 #' Update description
4 #'
5 #' @export Subcollection
6 Subcollection <- R6::R6Class(
7
8     "Subcollection",
9
10     public = list(
11
12         initialize = function(name, relativePath, children)
13         {
14             private$name <- name
15             private$relativePath <- relativePath
16             private$children <- children
17         },
18
19         getName = function() private$name,
20
21         getRelativePath = function() private$relativePath,
22
23         getSizeInBytes = function()
24         {
25             overallSize = 0
26             for(child in private$children)
27                 overallSize = overallSize + child$getSizeInBytes()
28
29             overallSize
30         },
31
32         setParent = function(parent) private$parent <- parent
33     ),
34
35     private = list(
36
37         name         = NULL,
38         relativePath = NULL,
39         children     = NULL,
40         parent       = NULL
41     ),
42     
43     cloneable = FALSE
44 )