Java tutorial
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { public static void createNoMeida(String dir) { File file = new File(dir + ".nomedia"); if (file.exists()) { return; } try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } }