Permalink
Browse files

docs for v0.2.5)

  • Loading branch information...
1 parent 716f347 commit c4bdddb51e36a0cd1d712f187080924b67abe90f @wactbprot committed Sep 7, 2013
@@ -1,10 +1,11 @@
#' Add attachments
#'
-#' This function adds attachments to a doc.
+#' This function adds attachments to a database document.
#'
#' The function uses \code{guessMIMEType()} to do exactly this.
#' If the switch \code{cdb$attachmentsWithPath} is set to \code{TRUE}
-#' the attachments were saved with path.
+#' the attachments were saved with path which is the default since version
+#' 0.2.5 of R4CouchDB
#'
#' @usage cdbAddAttachment(cdb)
#' @param cdb The list \code{cdb} has to contain
@@ -18,7 +19,7 @@
cdbAddAttachment <- function( cdb){
fname <- deparse(match.call()[[1]])
- cdb <- cdb$checkCdb(cdb,fname)
+ cdb <- cdb$checkCdb(cdb, fname)
if(cdb$error == ""){
tmpN <- length(tmpFn <- unlist(strsplit(cdb$fileName,"\\.")))
View
@@ -9,7 +9,7 @@
#'
#' @author wactbprot
#' @export
-#' @usage cdbIni(serverName="localhost", port="5984", DBName="", prot = "http", uname = "", pwd = "", newDBName = "", removeDBName = "", id = "", dataList = list(), fileName = "", design = "", view = "", list = "", queryParam = "", encSub = "?")
+#' @usage cdbIni(serverName="localhost", port="5984", DBName="", prot = "http", uname = "", pwd = "", newDBName = "", removeDBName = "", id = "", dataList = list(), fileName = "", design = "", view = "", list = "", queryParam = "", encSub = "?", attachmentsWithPath=TRUE)
#' @param serverName server name
#' @param port port
#' @param DBName name of database
@@ -26,6 +26,7 @@
#' @param list the name of the list to query
#' @param queryParam additional query params
#' @param encSub a character which is used as a replacement for chars who can not be converted by iconv
+#' @param attachmentsWithPath effects the result of the function cdbAddAttachment in the way the variable is named
#' @return \item{cdb}{The R4CouchDB (method) chain(ing) list }
#' @keywords misc
#'
@@ -45,7 +46,8 @@ cdbIni <- function(serverName = "localhost",
view = "",
list = "",
queryParam = "",
- encSub = "?"){
+ encSub = "?",
+ attachmentsWithPath = TRUE){
rc <- library(RCurl,
logical.return = TRUE,
@@ -13,12 +13,13 @@
\item{cdb}{The result is stored in \code{cdb$res} }
}
\description{
- This function adds attachments to a doc.
+ This function adds attachments to a database document.
}
\details{
The function uses \code{guessMIMEType()} to do exactly
this. If the switch \code{cdb$attachmentsWithPath} is set
- to \code{TRUE} the attachments were saved with path.
+ to \code{TRUE} the attachments were saved with path which
+ is the default since version 0.2.5 of R4CouchDB
}
\author{
wactbprot
View
@@ -6,7 +6,7 @@
prot = "http", uname = "", pwd = "", newDBName = "",
removeDBName = "", id = "", dataList = list(), fileName
= "", design = "", view = "", list = "", queryParam =
- "", encSub = "?")
+ "", encSub = "?", attachmentsWithPath=TRUE)
}
\arguments{
\item{serverName}{server name}
@@ -43,6 +43,10 @@
\item{encSub}{a character which is used as a replacement
for chars who can not be converted by iconv}
+
+ \item{attachmentsWithPath}{effects the result of the
+ function cdbAddAttachment in the way the variable is
+ named}
}
\value{
\item{cdb}{The R4CouchDB (method) chain(ing) list }
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit c4bdddb

Please sign in to comment.