| FileMap-class | R Documentation |
A reference class to represent a file map and handle persisting it to file.
A file map is a directory-specific dictionary keyed by file names (without
suffixes), whose values point to the actual locations of the associated
files. This saves duplicating large files such as images, in a way similar
to symbolic linking, but without requiring special file system support, and
with only one link per file set rather than one per file. The map is
serialised in YAML format to a file called map.yaml in the relevant
directory. Reading from this file happens on object creation and when the
read method is called; writing is only by an explicit call to the
write method.
directoryA character string representing the directory being mapped.
mapA list representation of the map in memory.
dropElements(keys)Remove elements with the specified keys from the in-memory map
getElements(keys)Return the values associated with the specified keys
getFile()Return the path to the map file, which may not yet exist
getMap(sorted = FALSE)Return the in-memory map, optionally sorted by key
initialize(path = "", ...)Create a FileMap object for the specified paths
read()Read the map file into memory
setElements(keys, values)Replace the specified keys with new values, which should be strings
write()Write the in-memory map to file, or delete the file if it is empty
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.