FileList Class

File Class

FileList(...)

Arguments

...

element or list of the element.

Value

File class generator

Fields

class

(character) Must be File to indicate this object describes a file.

path

(character) The path to the file.

checksum

[character] Optional hash code for validating file integrity. Currently must be in the form "sha1$ + hexidecimal string" using the SHA-1 algorithm.

size

[numeric] Optional file size.

secondaryFile

[FileList] A list of additional files that are associated with the primary file and must be transferred alongside the primary file. Examples include indexes of the primary file, or external references which must be included when loading primary document. A file object listed in secondaryFiles may itself include secondaryFiles for which the same rules apply.

Examples

library(jsonlite) library(yaml) f1 <- File() f2 <- File(path = "./out.bam", checksum = "test", size = 3L, secondaryFile = FileList(File(path = "./out.bai"))) fl <- FileList(f1, f2) asList(fl)
#> [[1]] #> [[1]]$class #> [x] "File" #> #> [[1]]$secondaryFile #> list() #> #> #> [[2]] #> [[2]]$class #> [x] "File" #> #> [[2]]$path #> [x] "./out.bam" #> #> [[2]]$checksum #> [x] "test" #> #> [[2]]$size #> [x] 3 #> #> [[2]]$secondaryFile #> [[2]]$secondaryFile[[1]] #> [[2]]$secondaryFile[[1]]$class #> [x] "File" #> #> [[2]]$secondaryFile[[1]]$path #> [x] "./out.bai" #> #> [[2]]$secondaryFile[[1]]$secondaryFile #> list() #> #> #> #>
f1
#> class: File #> secondaryFile: [] #>
f2
#> class: File #> path: ./out.bam #> checksum: test #> size: 3 #> secondaryFile: #> - class: File #> path: ./out.bai #> secondaryFile: [] #>
fl
#> [[1]] #> class: File #> secondaryFile: [] #> #> [[2]] #> class: File #> path: ./out.bam #> checksum: test #> size: 3 #> secondaryFile: #> - class: File #> path: ./out.bai #> secondaryFile: [] #>