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.
myFile <- ArvadosFile$new("myFile")
getName()
Returns name of the file.
ArvadosFile$getName()
arvadosFile$getName()
getFileListing()
Returns collections file content as character vector.
ArvadosFile$getFileListing(fullpath = TRUE)
fullPath
Checking if TRUE.
arvadosFile$getFileListing()
getSizeInBytes()
Returns collections content size in bytes.
ArvadosFile$getSizeInBytes()
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
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.
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()
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".
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.
arvadosFile$move(newPath)
copy()
Copies file to a new location inside collection.
ArvadosFile$copy(destination)
destination
Path to new folder.
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` ## ------------------------------------------------ myFile <- ArvadosFile$new("myFile") ## ------------------------------------------------ ## Method `ArvadosFile$getName` ## ------------------------------------------------ arvadosFile$getName() ## ------------------------------------------------ ## Method `ArvadosFile$getFileListing` ## ------------------------------------------------ arvadosFile$getFileListing() ## ------------------------------------------------ ## Method `ArvadosFile$getSizeInBytes` ## ------------------------------------------------ arvadosFile$getSizeInBytes() ## ------------------------------------------------ ## Method `ArvadosFile$read` ## ------------------------------------------------ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) fileContent <- arvadosFile$read("text") ## ------------------------------------------------ ## Method `ArvadosFile$connection` ## ------------------------------------------------ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) arvConnection <- arvadosFile$connection("w") ## ------------------------------------------------ ## Method `ArvadosFile$flush` ## ------------------------------------------------ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) myFile$write("This is new file content") arvadosFile$flush() ## ------------------------------------------------ ## Method `ArvadosFile$write` ## ------------------------------------------------ collection <- Collection$new(arv, collectionUUID) arvadosFile <- collection$get(fileName) myFile$write("This is new file content") ## ------------------------------------------------ ## Method `ArvadosFile$move` ## ------------------------------------------------ arvadosFile$move(newPath) ## ------------------------------------------------ ## Method `ArvadosFile$copy` ## ------------------------------------------------ arvadosFile$copy("NewName.format")