Description Usage Arguments Details Value References See Also Examples
Sync files/directories to/from S3
1 |
files |
A character vector specifying relative paths to files to be synchronized. The default is all files in the working directory and subdirectories. |
bucket |
Character string with the name of the bucket, or an object of class “s3_bucket”. |
verbose |
A logical indicating whether to be verbose (the default is |
... |
Additional arguments passed to |
s3sync
synchronizes specified files to an S3 bucket. This works best if a local directory (and its subdirectories) correspond directly to the contents of an S3 bucket.
If the bucket does not exist, it is created. Similarly, if local directories do not exist (corresponding to leading portions of object keys), they are created, recursively. Object keys are generated based on files
and local files are named (and organized into directories) based on object keys. A slash is interpreted as a directory level.
Local objects are copied to S3 and S3 objects are copied locally. This copying is performed conditionally. Objects existing locally but not in S3 are uploaded using put_object
. Objects existing in S3 but not locally, are saved using save_object
. If objects exist in both places, the MD5 checksum for each is compared; when identical, no copying is performed. If the checksums differ, local files are replaced with the bucket version if the local file is older and the S3 object is replaced if the local file is newer. If checksums differ but modified times match (which seems unlikely), a warning is issued.
A logical.
get_bucket
, put_object
, , save_object
1 2 3 4 | ## Not run:
s3sync(bucket = "examplebucket")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.