The OBJECT file inside each directory provides some high-level metadata of the object represented by that directory. It is guaranteed to have a type property that specifies the object type; individual objects may add their own information to this file. These methods are intended for developers to easily read and load information in the OBJECT file.

readObjectFile(path)

saveObjectFile(path, type, extra = list())

Arguments

path

Path to the directory representing an object.

type

String specifying the type of the object.

extra

Named list containing extra metadata to be written to the OBJECT file in path. Names should be unique, and any element named "type" will be overwritten by type.

Value

readObjectFile returns a named list of metadata for path.

saveObjectFile saves metadata to the OBJECT file inside path

Author

Aaron Lun

Examples

tmp <- tempfile()
dir.create(tmp)
saveObjectFile(tmp, "foo", list(bar=list(version="1.0")))
readObjectFile(tmp)
#> $bar
#> $bar$version
#> [1] "1.0"
#> 
#> 
#> $type
#> [1] "foo"
#>