View source: R/zipRelatedFiles.R
zipRelatedFiles | R Documentation |
Zip files in a common directory that share the same base name (i.e., file name sans path and extension). Zipped file includes all relevant files zipped into a single, compressed file named as: package number + basefile name + md5sum + extension (zip).
zipRelatedFiles(pathToFile, targetFile)
pathToFile |
quoted name of the directory where the target file is located directory |
targetFile |
quoted name of target data file to which other file names in the prescribed directory will be evalated directory |
zipRelatedFiles is a helper function designed primarily to assist the creation of EML spatial data objects. A spatial data entity often consists of more than one file (e.g., shapefiles; raster (*.img, *.xml)) that are incorporated into a single zipped file for upload to PASTA. This function zips related files as determined by the same base file name (e.g., CAP_1985.img and CAP_1985.img.aux.xml share the same base name and would be zipped). In keeping with the CAP LTER workflow for generating EML metadata, the resulting compressed file is named package number + basefile name + md5sum + extension (zip). Though intended primarily as a helper function, zipRelatedFiles can be run independently.
the zipped file name for inclusion in the EML documentation - not relevant when run independently
zipRelatedFiles is specific to UNIX operating environments.
## Not run:
zipRelatedFiles(
pathToFile = "~/folder/",
targetFile = "CAP_1985.img")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.