public class AbstractFileTransfer implements FileTransfer
public AbstractFileTransfer(@NotNull
AemExtension aem)
public boolean getEnabled()
When enabled, transfer will be considered when finding transfer handling particular URL.
public void setEnabled(boolean p)
When enabled, transfer will be considered when finding transfer handling particular URL.
public boolean getParallelable()
Determines if operations using this transfer could be done in parallel.
public void download(@NotNull
java.lang.String fileUrl)
Downloads file from specified URL to temporary directory with preserving file name.
public void downloadFrom(@NotNull
java.lang.String dirUrl,
@NotNull
java.lang.String fileName,
@NotNull
java.io.File target)
Downloads file with given name from directory available at specified URL.
public void uploadTo(@NotNull
java.lang.String dirUrl,
@NotNull
java.lang.String fileName,
@NotNull
java.io.File source)
Uploads file to directory available at specified URL and set given name.
public void deleteFrom(@NotNull
java.lang.String dirUrl,
@NotNull
java.lang.String fileName)
Deletes file of given name in directory available at specified URL.
public void truncate(@NotNull
java.lang.String dirUrl)
Deletes all files in directory available at specified URL.
@NotNull
public java.util.List<com.cognifide.gradle.aem.common.file.transfer.FileEntry> list(@NotNull
java.lang.String dirUrl)
Lists files in directory available at specified URL.
@Nullable public FileEntry stat(@NotNull java.lang.String dirUrl, @NotNull java.lang.String fileName)
Gets file status of given name in directory at specified URL.
@NotNull public FileDownloader downloader()
@NotNull public FileUploader uploader()
@NotNull protected AemExtension getAem()