/** * Creates a new file in the default temporary-file directory, using the given * prefix and suffix to generate its name, asynchronously. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxCreateTempFile} instead */ @Deprecated() public Observable<String> createTempFileObservable(String prefix, String suffix) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); createTempFile(prefix, suffix, handler.toHandler()); return handler; }
/** * Creates a new file in the directory provided by the path <code>dir</code>, using the given * prefix and suffix to generate its name, asynchronously. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @param perms * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxCreateTempFile} instead */ @Deprecated() public Observable<String> createTempFileObservable(String prefix, String suffix, String perms) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); createTempFile(prefix, suffix, perms, handler.toHandler()); return handler; }
/** * Creates a new file in the directory provided by the path <code>dir</code>, using the given * prefix and suffix to generate its name, asynchronously. * <p> * The new directory will be created with permissions as specified by <code>perms</code>. * </p> * The permission String takes the form rwxr-x--- as specified * in <a href="http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html">here</a>. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param dir the path to directory in which to create the directory * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @param perms the permissions string * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxCreateTempFile} instead */ @Deprecated() public Observable<String> createTempFileObservable(String dir, String prefix, String suffix, String perms) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); createTempFile(dir, prefix, suffix, perms, handler.toHandler()); return handler; }
/** * Creates a new file in the default temporary-file directory, using the given * prefix and suffix to generate its name, asynchronously. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @return a reference to this, so the API can be used fluently */ public Single<String> rxCreateTempFile(String prefix, String suffix) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { createTempFile(prefix, suffix, fut); })); }
/** * Creates a new file in the default temporary-file directory, using the given * prefix and suffix to generate its name, asynchronously. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @return a reference to this, so the API can be used fluently */ public Single<String> rxCreateTempFile(String prefix, String suffix) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { createTempFile(prefix, suffix, fut); })); }
/** * Creates a new file in the directory provided by the path <code>dir</code>, using the given * prefix and suffix to generate its name, asynchronously. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @param perms * @return a reference to this, so the API can be used fluently */ public Single<String> rxCreateTempFile(String prefix, String suffix, String perms) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { createTempFile(prefix, suffix, perms, fut); })); }
/** * Creates a new file in the directory provided by the path <code>dir</code>, using the given * prefix and suffix to generate its name, asynchronously. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @param perms * @return a reference to this, so the API can be used fluently */ public Single<String> rxCreateTempFile(String prefix, String suffix, String perms) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { createTempFile(prefix, suffix, perms, fut); })); }
/** * Creates a new file in the directory provided by the path <code>dir</code>, using the given * prefix and suffix to generate its name, asynchronously. * <p> * The new directory will be created with permissions as specified by <code>perms</code>. * </p> * The permission String takes the form rwxr-x--- as specified * in <a href="http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html">here</a>. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param dir the path to directory in which to create the directory * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @param perms the permissions string * @return a reference to this, so the API can be used fluently */ public Single<String> rxCreateTempFile(String dir, String prefix, String suffix, String perms) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { createTempFile(dir, prefix, suffix, perms, fut); })); }
/** * Creates a new file in the directory provided by the path <code>dir</code>, using the given * prefix and suffix to generate its name, asynchronously. * <p> * The new directory will be created with permissions as specified by <code>perms</code>. * </p> * The permission String takes the form rwxr-x--- as specified * in <a href="http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html">here</a>. * * <p> * As with the <code>File.createTempFile</code> methods, this method is only * part of a temporary-file facility.A {@link java.lang.Runtime}, * or the {@link java.io.File} mechanism may be used to delete the directory automatically. * </p> * @param dir the path to directory in which to create the directory * @param prefix the prefix string to be used in generating the directory's name; may be <code>null</code> * @param suffix the suffix string to be used in generating the file's name; may be <code>null</code>, in which case "<code>.tmp</code>" is used * @param perms the permissions string * @return a reference to this, so the API can be used fluently */ public Single<String> rxCreateTempFile(String dir, String prefix, String suffix, String perms) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { createTempFile(dir, prefix, suffix, perms, fut); })); }