Android examples for java.io:Folder
is one folder is the Sub Directory from another folder
import java.io.File; import java.util.regex.Pattern; public class Main { public static boolean isSubDirectory(File sourceLocation, File targetLocation) { return Pattern.matches(sourceLocation.getAbsolutePath() + ".*", targetLocation.getAbsolutePath()); }/*from w w w .jav a2s. c o m*/ }