modify_objects: Adds or removes objects in the storage.

Description Usage Arguments Value

View source: R/objectstorage.R

Description

Adds or removes objects in the storage.

Usage

1
2
3
4
5
6
modify_objects(storagepath, obj.environment = NULL,
  objects_to_add = NULL, objects_to_remove = character(0),
  flag_forced_save_filenames = FALSE, flag_use_tmp_storage = FALSE,
  forced_archive_paths = NA, compress = "gzip",
  large_archive_prefix = NULL, locktimeout = NULL, wait_for = "save",
  parallel_cpus = NULL)

Arguments

storagepath

Path with the storage.

obj.environment

Environment or named list with the objects. Defaults to the current environment.

flag_forced_save_filenames

Controls, whether force a particular object in its own dedicated archive. Value can be either single boolean, or vector of booleans with the same size as addobjectnames, or named boolean vector with keys values of addobjectnames. In the latter case, non-mentioned objects will be assumed value FALSE (i.e. not forced filename).

forced_archive_paths

Optional character vector with custom paths to the archives. Can be a single character object, vector with the size of objects_to_add or named vector with keys from objects_to_add.

compress

Controls the compression of the archive. It is important to realize, that if the archive had already contained some objects prior to modifying it and the modification would not remove the objects, those objects will be re-compressed with the compress compression, since the archive will effectively be re-added. Supports 3 calues: none, gzip and xz. Value can be either single character, or vector of characters with the same size as addobjectnames, or named character vector with keys values of addobjectnames. In the latter case, non-mentioned objects will be assumed value gzip.

large_archive_prefix

If set, all new archives for large objects will be saved with this prefix, otherwise in the dirname(storagepath). storagepath. It is up to the user to make sure this directory is empty and no file name conflicts will arise.

addobjectnames

Character vector with the names of the objects to add. Defaults to all objects in the obj.environment.

removeobjectnames

Character vector with the names of the objects to remove. Cannot contain objects listed in addobjectnames.

Value

Returns 'data.frame' with the following columns:

objectname

Name of the stored object. This is a primary key.

digest

String with the digest of the object.

size

Numeric value with the size of the stored object.

forced_archive_paths

Path where the object is stored absolute or relative to the storage path.

single_object

Logical. TRUE if the archive contain only this one object. Otherwise archive contains named list of objects.

compress

Type of compression used to store this individual object


adamryczkowski/objectstorage documentation built on May 24, 2019, 8:47 p.m.