Example usage for io.vertx.core.file FileSystem copyRecursiveBlocking

List of usage examples for io.vertx.core.file FileSystem copyRecursiveBlocking

Introduction

In this page you can find the example usage for io.vertx.core.file FileSystem copyRecursiveBlocking.

Prototype

@Fluent
FileSystem copyRecursiveBlocking(String from, String to, boolean recursive);

Source Link

Document

Blocking version of #copyRecursive(String,String,boolean,Handler)

Usage

From source file:de.braintags.netrelay.controller.filemanager.elfinder.command.impl.AbstractCommand.java

License:Open Source License

/**
 * Copy the file or folder to the destination
 * //from   ww  w  . j  a  v a2  s .  c  o  m
 * @param src
 * @param dst
 * @throws IOException
 */
protected void createAndCopy(ITarget src, ITarget dst) {
    FileSystem fs = src.getVolume().getFileSystem();
    if (src.isFolder()) {
        fs.copyRecursiveBlocking(src.getAbsolutePath(), dst.getAbsolutePath(), true);
    } else {
        fs.copyBlocking(src.getAbsolutePath(), dst.getAbsolutePath());
    }
}