ArvadosFile | R Documentation |
ArvadosFile class represents a file inside Arvados collection.
new()
Initialize new enviroment.
ArvadosFile$new(name)
name
Name of the new enviroment.
A new 'ArvadosFile' object.
\dontrun{ myFile <- ArvadosFile$new("myFile") }
getName()
Returns name of the file.
ArvadosFile$getName()
\dontrun{ arvadosFile$getName() }
getFileListing()
Returns collections file content as character vector.
ArvadosFile$getFileListing(fullpath = TRUE)
fullPath
Checking if TRUE.
\dontrun{ arvadosFile$getFileListing() }
getSizeInBytes()
Returns collections content size in bytes.
ArvadosFile$getSizeInBytes()
\dontrun{ arvadosFile$getSizeInBytes() }
get()
ArvadosFile$get(fileLikeObjectName)
getFirst()
ArvadosFile$getFirst()
getCollection()
Returns collection UUID.
ArvadosFile$getCollection()
setCollection()
Sets new collection.
ArvadosFile$setCollection(collection, setRecursively = TRUE)
getRelativePath()
Returns file path relative to the root.
ArvadosFile$getRelativePath()
getParent()
Returns project UUID.
ArvadosFile$getParent()
setParent()
Sets project collection.
ArvadosFile$setParent(newParent)
read()
Read file content.
ArvadosFile$read(contentType = "raw", offset = 0, length = 0)
contentType
Type of content. Possible is "text", "raw".
offset
Describes the location of a piece of data compared to another location
length
Length of content
\dontrun{ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) fileContent <- arvadosFile$read("text") }
connection()
Get connection opened in "read" or "write" mode.
ArvadosFile$connection(rw)
rw
Type of connection.
\dontrun{ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) arvConnection <- arvadosFile$connection("w") }
flush()
Write connections content to a file or override current content of the file.
ArvadosFile$flush()
\dontrun{ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) myFile$write("This is new file content") arvadosFile$flush() }
write()
Write to file or override current content of the file.
ArvadosFile$write(content, contentType = "text/html")
content
File to write.
contentType
Type of content. Possible is "text", "raw".
\dontrun{ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) myFile$write("This is new file content") }
move()
Moves file to a new location inside collection.
ArvadosFile$move(destination)
destination
Path to new folder.
\dontrun{ arvadosFile$move(newPath) }
copy()
Copies file to a new location inside collection.
ArvadosFile$copy(destination)
destination
Path to new folder.
\dontrun{ arvadosFile$copy("NewName.format") }
duplicate()
Duplicate file and gives it a new name.
ArvadosFile$duplicate(newName = NULL)
newName
New name for duplicated file.
## ------------------------------------------------ ## Method `ArvadosFile$new` ## ------------------------------------------------ ## Not run: myFile <- ArvadosFile$new("myFile") ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$getName` ## ------------------------------------------------ ## Not run: arvadosFile$getName() ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$getFileListing` ## ------------------------------------------------ ## Not run: arvadosFile$getFileListing() ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$getSizeInBytes` ## ------------------------------------------------ ## Not run: arvadosFile$getSizeInBytes() ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$read` ## ------------------------------------------------ ## Not run: collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) fileContent <- arvadosFile$read("text") ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$connection` ## ------------------------------------------------ ## Not run: collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) arvConnection <- arvadosFile$connection("w") ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$flush` ## ------------------------------------------------ ## Not run: collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) myFile$write("This is new file content") arvadosFile$flush() ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$write` ## ------------------------------------------------ ## Not run: collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) myFile$write("This is new file content") ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$move` ## ------------------------------------------------ ## Not run: arvadosFile$move(newPath) ## End(Not run) ## ------------------------------------------------ ## Method `ArvadosFile$copy` ## ------------------------------------------------ ## Not run: arvadosFile$copy("NewName.format") ## End(Not run)