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())
readObjectFile
returns a named list of metadata for path
.
saveObjectFile
saves metadata
to the OBJECT file inside path
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"
#>