forked from Sage-Bionetworks/rSynapseClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsynapseFileTransfer.Rd
76 lines (71 loc) · 1.71 KB
/
synapseFileTransfer.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
\name{synapseFileTransfer}
\alias{synapseDownloadFile}
\alias{synapseDownloadFileToDestination}
\alias{synapseUploadFile}
\title{
Upload/Download a File from Synapse
}
\description{
Functions for uploading and downloading files using the libcurl library that is part of RCurl.
}
\usage{
synapseDownloadFile(url, checksum, curlHandle = getCurlHandle(), cacheDir = synapseCacheDir(), opts = .getCache("curlOpts"))
synapseDownloadFileToDestination(url, destfile, checksum, curlHandle = getCurlHandle(), opts = .getCache("curlOpts"))
synapseUploadFile(url, srcfile, checksum, contentType =
"application/binary", method = "curl", quiet = FALSE,
mode = "w", cacheOK = TRUE)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{url}{
url of the remote file
}
\item{srcfile}{
local file to upload
}
\item{checksum}{
checksum of the local file
}
\item{curlHandle}{
curlHandle for the request
}
\item{cacheDir}{
local file cache directory where downloaded files will be stored
}
\item{opts}{
curl options
}
\item{destfile}{
local file location
}
\item{method}{
method to be used for transfer. currently only "curl" is supported.
}
\item{quiet}{
boolean indicated whether function should print output to stdout
}
\item{mode}{
mode of the file
}
\item{cacheOK}{
boolean controlling cache
}
\item{contentType}{
content type
}
}
\details{
These functions bypass R's memory using c curlWriter and curlReader functions.
}
\value{
synapseDownloadFile returns a list of the files that were downloaded
}
\author{
Matt Furia
}
\note{
This is an internal method and should not be called by the user
}
\seealso{
\code{\link{curlPerform}}
}