public static File createUniqueFile ( File targetFolder , String originalFile , boolean keepOriginal ) { String mimeType = MimeTypeMap . getSingleton ( ) . getMimeTypeFromExtension ( originalFile ) ; return createUniqueFile ( targetFolder , originalFile , mimeType , keepOriginal ) ; }
Creates a file with a non - conflicting file name in a specified folder based on an existing file name .