common-plugin / com.cognifide.gradle.common.file.transfer.generic / PathFileTransfer

PathFileTransfer

class PathFileTransfer : AbstractFileTransfer

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

Constructors

<init>

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

PathFileTransfer(common: CommonExtension)

Properties

name

Unique identifier.

val name: String

Functions

deleteFrom

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

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

downloadFrom

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

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

handles

Checks if supports particular URL

fun handles(fileUrl: String): Boolean

list

Lists files in directory available at specified URL.

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

stat

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

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

truncate

Deletes all files in directory available at specified URL.

fun truncate(dirUrl: String): Unit

uploadTo

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

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

Companion Object Properties

NAME

const val NAME: String