List of utility methods to do File Temp Create
File | aTempFile() a Temp File return removeableFile(tempFolder(), UUID.randomUUID().toString());
|
File | createTemp(File file) Creates a temporary normal file. try { Check.arg().notNull(file); if (file.exists()) { boolean deleted = file.delete(); if (!deleted) throw new RuntimeException( "file = " + file.getPath() ... |
File | createTemp(String path) Returns #createTemp(File) createTemp ( new File(path) ) .
Check.arg().notNull(path); return createTemp(new File(path)); |
File | createTempFile() create Temp File return createFileInFolder(tempFolder(), UUID.randomUUID()
.toString());
|
java.io.File | createTempFile(File baseDir, String fileName) create Temp File File tempFile = new File(baseDir, fileName); tempFile.deleteOnExit(); return tempFile; |
File | createTempFile(String filePrefix, String fileSuffix) This wraps the standard create temp file and forces everything into the same baseDir. return File.createTempFile(filePrefix, fileSuffix, baseDir);
|
File | createTempFile(String pFilename) create Temp File String lPrefix = TEMP_DIR_NAME + pFilename; int lSuffix = 1; String lFilename = lPrefix; File lTempFile = null; while ((lTempFile = new File(lFilename)).exists()) { lFilename = lPrefix + lSuffix++; lTempFile.getParentFile().mkdirs(); ... |
File | getTempFile() get Temp File return getTempFile("temp", ".tmp"); |
String | getTempFile(String dir, String fileExt) get Temp File String tempFileName = CommUtil.formatDate("yyMMdd-HHmmssS", new Date()) + fileExt; File file = new File(dir + "/" + tempFileName); if (file.exists()) return getTempFile(dir, fileExt); else return tempFileName; |
File | getTempFile(String prefix, String suffix) get Temp File File file = null; try { file = File.createTempFile(prefix, suffix, getApp() .getApplicationContext().getExternalCacheDir()); myTempFiles.add(file); } catch (Exception e) { return file; ... |