List of utility methods to do File Create
void | createFile(String path, boolean isFile) create File createFile(new File(path), isFile);
|
File | createFileInFolder(File folder, String fileName) create File In Folder File file = removeableFile(folder, fileName);
file.createNewFile();
return file;
|
File | createFileInFolder(File folder, String fileName) create File In Folder File file = new File(folder, fileName); file.createNewFile(); file.deleteOnExit(); return file; |
void | createIfNoExist(String path) create If No Exist File file = new File(path); if (file.exists()) return; if (!file.createNewFile()) throw new IOException("Could not create file: " + path); |
File | createNewFile(File file) create a new blank file File pareFile = file.getParentFile(); if (pareFile.exists() || pareFile.mkdirs()) { File newFile = file; if (newFile.exists() || newFile.createNewFile()) return newFile; return null; |
File | createNewFile(String filePath) create New File File file = new File(filePath); if (file.exists()) return file; File dir = file.getParentFile(); if (!dir.exists()) dir.mkdirs(); try { file.createNewFile(); ... |
void | createNewFile(String filePath) create New File File file = new File(filePath); try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); |
File | createNewFile(String filepath) create New File return createNewFile(new File(filepath)); |
File | createNewFileOnExist(String filePath) create New File On Exist File file = new File(filePath); if (file.exists()) file.delete(); File dir = file.getParentFile(); if (!dir.exists()) dir.mkdirs(); try { file.createNewFile(); ... |
String | createSequenceFileName(String prefix, int sequenceNumber, int padTo, String suffix) create Sequence File Name return prefix + paddedInt(sequenceNumber, padTo) + suffix;
|