| ExtFileGenerator | R Documentation |
The mother class of all file generators for biodb extension packages.
All file generator classes for biodb extensions must inherit from this class.
biodb::ExtGenerator -> ExtFileGenerator
new()Initializer.
ExtFileGenerator$new(
filename = NULL,
overwrite = FALSE,
folder = character(),
template = NULL,
upgrader = c("fullReplacer", "lineAdder"),
...
)filenameThe name of the generated file.
overwriteIf set to TRUE, then overwrite existing destination file, even whatever the version of the template file. If set to FALSE, only overwrite if the version of the template file is strictly greater than the existing destination file.
folderThe destination subfolder inside the package directory, as a character vector of subfolders hierarchy.
templateThe filename of the template to use.
upgraderThe type of upgrader to use. "fullReplacer" replaces the whole destination file by the template if it is newer (it compares version numbers). "lineAdder" only adds to the destination file the missing lines from the template file.
...See the constructor of ExtGenerator for the parameters.
Nothing.
clone()The objects of this class are cloneable with this method.
ExtFileGenerator$clone(deep = FALSE)
deepWhether to make a deep clone.
pkgFolder <- file.path(tempfile(), 'biodbFoo')
dir.create(pkgFolder, recursive=TRUE)
biodb::ExtConnClass$new(path=pkgFolder, dbName='foo.db',
dbTitle='Foo database',
connType='mass', remote=TRUE)$generate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.