commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r828962 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
Date Fri, 23 Oct 2009 08:20:04 GMT
Author: mturk
Date: Fri Oct 23 08:20:04 2009
New Revision: 828962

URL: http://svn.apache.org/viewvc?rev=828962&view=rev
Log:
By default Stream is not seekable

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java?rev=828962&r1=828961&r2=828962&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java Fri
Oct 23 08:20:04 2009
@@ -457,6 +457,40 @@
     }
 
     /**
+     * Create new temporary file inside {@code directory}.
+     *
+     * @param prefix temporary file prefix.
+     *
+     * @return new temporary file {@code Descriptor}.
+     */
+    public static Descriptor createTemp(String prefix, String suffix,
+                                        Path directory, boolean preserve)
+        throws IOException, IllegalArgumentException, SecurityException
+    {
+        if (prefix == null) {
+            throw new IllegalArgumentException();
+        }
+        return FileWrapper.mktemp(directory, prefix, suffix, preserve);
+    }
+
+    /**
+     * Create new temporary file inside current directory.
+     *
+     * @param prefix file prefix.
+     *
+     * @return new temporary file {@code Descriptor}.
+     */
+    public static Descriptor createTemp(String prefix, String suffix,
+                                        boolean preserve)
+        throws IOException, IllegalArgumentException, SecurityException
+    {
+        if (prefix == null) {
+            throw new IllegalArgumentException();
+        }
+        return FileWrapper.mktemp(prefix, suffix, preserve);
+    }
+
+    /**
      * Return target pathname of this abstract {@code File} instance.
      *
      * @return Pathname this {@code File} points to.



Mime
View raw message