save_objects_non_nse: Replaces objects in the storage.

Description Usage Arguments Value

View source: R/objectstorage.R

Description

Replaces objects in the storage.

Usage

1
2
3
4
5
save_objects_non_nse(storagepath, obj.environment = rlang::caller_env(),
  objectnames = NULL, 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 that contains the objects

objectnames

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

flag_forced_save_filenames

Optional boolean vector. 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 objectnames, or named boolean vector with keys values of objectnames. In the latter case, non-mentioned objects will be assumed value FALSE (i.e. not forced filename).

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 objectnames, or named character vector with keys values of objectnames. 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.

archive_filename

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

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.

archive_filename

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.