syncDBtoRepo: Make sure all files stored internally in a receiver DB are...

View source: R/syncDBtoRepo.R

syncDBtoRepoR Documentation

Make sure all files stored internally in a receiver DB are also present in the file_repo.

Description

Make sure all files stored internally in a receiver DB are also present in the file_repo.

Usage

syncDBtoRepo(serno, dbdir = MOTUS_PATH$RECV, repo = MOTUS_PATH$FILE_REPO,
  bkup = MOTUS_PATH$TRASH)

Arguments

serno

receiver serial number

dbdir

path to folder with existing receiver databases Default: MOTUS_PATH$RECV

repo

path to folder with existing receiver file repos Default: MOTUS_PATH$FILE_REPO

bkup

path to folder for storing replaced files as backup. They will be stored in a folder whose name is the receiver serial number Default: MOTUS_PATH$TRASH

Value

a data.frame with these columns:

  • name - character; bare filename, without compression extension

  • status - integer; status of DB file; possible values:

    • 0: file already in repo and contents there of same size equal or larger than DB contents, so no action taken

    • 1: file already in repo but contents there were smaller than DB contents, so file replaced and old copy sent to oldrepo

    • 2: file not in repo, so added to repo

Returns NULL if no valid data files were found.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


MotusWTS/motusServer documentation built on Oct. 13, 2024, 7:31 p.m.