sgMergeFiles | R Documentation |
Determines which files are redundant, new, or partially new. Does *not* run the tag finder.
sgMergeFiles(files, j, dbdir = MOTUS_PATH$RECV)
files |
either a character vector of full paths to files, or the full path to a directory, which will be searched recursively for raw sensorgnome data files. |
j |
job, whose ID will be recorded with records of new / changed files. |
dbdir |
path to folder with existing receiver databases
Default: |
Any new content from files is merged into the files and fileContents tables of the receiver DBs.
Files are disposed of like so:
any files which are symlinks are deleted after merging their target's contents; i.e. the symlink is deleted, not the file it points to.
files whose path has MOTUS_PATH$FILE_REPO
as a prefix are left as-is
files whose path does not have MOTUS_PATH$FILE_REPO
as a prefix, and which
either are new or have new content are moved to MOTUS_PATH$FILE_REPO/serno/YYYY-MM-DD
remaining files are moved to MOTUS_PATH$TRASH
a list with two items:
info- a data_frame reporting the details of each file, with these columns:
name - full path to filename
use - TRUE iff data from this file will be incorporated in this run (i.e. the file is new, or has more content than its previous version)
new - TRUE iff a file of this name was not yet in database
done - TRUE iff this is a compressed file and we have its full contents
corrupt - TRUE the file was compressed but corrupted
small - TRUE iff the file contents are shorter than existing contents for that file in the receiver DB
partial - TRUE iff this is a partial compressed file for which an uncompressed version is in the same batch
serno - serial number of the receiver, parsed from this filename
monoBN - monotonic boot session, parsed from filename
ts - starting timestamp, parsed from filename
resumable - a logical vector indicating the tag finder can be run with –resume for each
subset of files from a distinct (serno, monoBN) pair. The vector has names consisting of
paste(serno, monoBN)
.
Returns NULL if no valid sensorgnome data files were found.
John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm
sgRunNewFiles
, which calls this function and then calls sgFindTags
as appropriate.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.