1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/ArvadosFile.R
7 ArvadosFile class represents a file inside Arvados collection.
11 \preformatted{file = ArvadosFile$new(name)}
17 \item{name}{Name of the file.}
24 \item{getName()}{Returns name of the file.}
25 \item{getRelativePath()}{Returns file path relative to the root.}
26 \item{read(contentType = "raw", offset = 0, length = 0)}{Read file content.}
27 \item{write(content, contentType = "text/html")}{Write to file (override current content of the file).}
28 \item{connection(rw)}{Get connection opened in "read" or "write" mode.}
29 \item{flush()}{Write connections content to a file (override current content of the file).}
30 \item{remove(name)}{Removes ArvadosFile or Subcollection specified by name from the subcollection.}
31 \item{getSizeInBytes()}{Returns file size in bytes.}
32 \item{move(newLocation)}{Moves file to a new location inside collection.}
38 myFile <- ArvadosFile$new("myFile")
40 myFile$write("This is new file content")
41 fileContent <- myFile$read()
42 fileContent <- myFile$read("text")
43 fileContent <- myFile$read("raw", offset = 8, length = 4)
46 arvConnection <- myFile$connection("w")
47 write.table(mytable, arvConnection)
51 arvConnection <- myFile$connection("r")
52 mytable <- read.table(arvConnection)
54 myFile$move("newFolder/myFile")