/** * Copy a file from the path <code>from</code> to path <code>to</code>, asynchronously. * <p> * If <code>recursive</code> is <code>true</code> and <code>from</code> represents a directory, then the directory and its contents * will be copied recursively to the destination <code>to</code>. * <p> * The copy will fail if the destination if the destination already exists. * @param from the path to copy from * @param to the path to copy to * @param recursive * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxCopyRecursive} instead */ @Deprecated() public Observable<Void> copyRecursiveObservable(String from, String to, boolean recursive) { io.vertx.rx.java.ObservableFuture<Void> handler = io.vertx.rx.java.RxHelper.observableFuture(); copyRecursive(from, to, recursive, handler.toHandler()); return handler; }
/** * Copy a file from the path <code>from</code> to path <code>to</code>, asynchronously. * <p> * If <code>recursive</code> is <code>true</code> and <code>from</code> represents a directory, then the directory and its contents * will be copied recursively to the destination <code>to</code>. * <p> * The copy will fail if the destination if the destination already exists. * @param from the path to copy from * @param to the path to copy to * @param recursive * @return a reference to this, so the API can be used fluently */ public Single<Void> rxCopyRecursive(String from, String to, boolean recursive) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { copyRecursive(from, to, recursive, fut); })); }
/** * Copy a file from the path <code>from</code> to path <code>to</code>, asynchronously. * <p> * If <code>recursive</code> is <code>true</code> and <code>from</code> represents a directory, then the directory and its contents * will be copied recursively to the destination <code>to</code>. * <p> * The copy will fail if the destination if the destination already exists. * @param from the path to copy from * @param to the path to copy to * @param recursive * @return a reference to this, so the API can be used fluently */ public Single<Void> rxCopyRecursive(String from, String to, boolean recursive) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { copyRecursive(from, to, recursive, fut); })); }