RemoteFile

interface RemoteFile : RemoteEntry, RemoteData

An abstraction over a file entry for a file on a pCloud account's filesystem.

See also

Functions

asFile
Link copied to clipboard
abstract fun asFile(): RemoteFile
Returns this RemoteEntry as RemoteFile See isFile.
asFolder
Link copied to clipboard
abstract fun asFolder(): RemoteFolder
Returns this RemoteEntry as a RemoteFolder See isFolder.
byteStream
Link copied to clipboard
abstract fun byteStream(): InputStream
Open an InputStream to the resource.
canDelete
Link copied to clipboard
abstract fun canDelete(): Boolean
canModify
Link copied to clipboard
abstract fun canModify(): Boolean
canRead
Link copied to clipboard
abstract fun canRead(): Boolean
contentType
Link copied to clipboard
abstract fun contentType(): String
copy
Link copied to clipboard
abstract fun copy(toFolder: RemoteFolder): RemoteEntry
abstract fun copy(toFolder: RemoteFolder, overwrite: Boolean): RemoteEntry
Copy this file to a specified folder.
created
Link copied to clipboard
abstract fun created(): Date
createFileLink
Link copied to clipboard
abstract fun createFileLink(): FileLink
abstract fun createFileLink(options: DownloadOptions): FileLink
Create a file link for this file The method will block until the link is created or an exception is thrown.
delete
Link copied to clipboard
abstract fun delete(): Boolean
Delete this file.
download
Link copied to clipboard
abstract fun download(sink: DataSink)
Download the contained data to a DataSinkThe method will block until the download operation completes or an exception is thrown.
abstract fun download(sink: DataSink, listener: ProgressListener)
Download the contained data to a DataSink Attempts to download the resource data to the specified location, optionally sending progress updates via a ProgressListener.
fileId
Link copied to clipboard
abstract fun fileId(): Long
hash
Link copied to clipboard
abstract fun hash(): String
id
Link copied to clipboard
abstract fun id(): String
isFile
Link copied to clipboard
abstract fun isFile(): Boolean
isFolder
Link copied to clipboard
abstract fun isFolder(): Boolean
isMine
Link copied to clipboard
abstract fun isMine(): Boolean
isShared
Link copied to clipboard
abstract fun isShared(): Boolean
lastModified
Link copied to clipboard
abstract fun lastModified(): Date
move
Link copied to clipboard
abstract fun move(toFolder: RemoteFolder): RemoteEntry
Move this file to a specified folder.
name
Link copied to clipboard
abstract fun name(): String
parentFolderId
Link copied to clipboard
abstract fun parentFolderId(): Long
rename
Link copied to clipboard
abstract fun rename(newFilename: String): RemoteEntry
Rename this file.
size
Link copied to clipboard
abstract fun size(): Long
source
Link copied to clipboard
abstract fun source(): BufferedSource
Open an BufferedSource to the resource.