common-plugin / com.cognifide.gradle.common.file.transfer / AbstractFileTransfer

AbstractFileTransfer

abstract class AbstractFileTransfer : FileTransferHandler, Serializable

Constructors

<init>

AbstractFileTransfer(common: CommonExtension)

Properties

common

val common: CommonExtension

enabled

When enabled, transfer will be considered when finding transfer handling particular URL.

open val enabled: Property<Boolean!>!

parallelable

Determines if operations using this transfer could be done in parallel.

open val parallelable: Provider<Boolean!>!

Functions

deleteFrom

Deletes file of given name in directory available at specified URL.

open fun deleteFrom(dirUrl: String, fileName: String): Unit

download

Downloads file from specified URL to temporary directory with preserving file name.

open fun download(fileUrl: String): File

downloader

fun downloader(options: FileDownloader.() -> Unit = {}): FileDownloader

downloadFrom

Downloads file with given name from directory available at specified URL.

open fun downloadFrom(dirUrl: String, fileName: String, target: File): Unit

list

Lists files in directory available at specified URL.

open fun list(dirUrl: String): List<FileEntry>

stat

Gets file status of given name in directory at specified URL.

open fun stat(dirUrl: String, fileName: String): FileEntry?

truncate

Deletes all files in directory available at specified URL.

open fun truncate(dirUrl: String): Unit

uploader

fun uploader(options: FileUploader.() -> Unit = {}): FileUploader

uploadTo

Uploads file to directory available at specified URL and set given name.

open fun uploadTo(dirUrl: String, fileName: String, source: File): Unit

Inheritors

PathFileTransfer

File transfer which is copying files instead of using them directly.

class PathFileTransfer : AbstractFileTransfer

ProtocolFileTransfer

abstract class ProtocolFileTransfer : AbstractFileTransfer