You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/10/23 10:20:04 UTC
svn commit: r828962 -
/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
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.