API parameters:
/**filename: The name of the temporary file, the resulting file name will be "FileName + random number" suffix: file suffix, for example,. txt,. tmpparentfile: Temporary file directory, if not specified, The temporary files are stored in the system temp file directory by default */public static file Createtempfile (string fileName, string suffix, File parentfile)
The code is as follows:
Import Java.io.file;import java.io.ioexception;import Java.io.file;import Java.io.ioexception;public class createtempfiletest {public static void main (string[] args) throws IOException {File tmp = File.createtempfile ("Lzq", ". tmp" ", New File (" c:\\ "));}}
Temporary files
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/82/71/wKioL1dVSvrQSTMnAAEXTOCJ4aw055.png-wh_500x0-wm_3 -wmp_4-s_2020354599.png "title=" qq picture 20160606175954.png "alt=" Wkiol1dvsvrqstmnaaextocj4aw055.png-wh_50 "/>
This article is from the architect's path blog, so be sure to keep this source http://lizhuquan0769.blog.51cto.com/2591147/1786684
"Java" File.createtempfile create temporary files