static boolean isIgnoredFile(File file){
  String name=file.getName();
  return name.equals(".svn") || name.equals(".git") || name.equals(".hg")|| name.equals(".DS_Store")|| name.endsWith("~") && name.length() > 1;
}

static boolean isIgnoredFile ( File file ) { String name = file . getName ( ) ; return name . equals ( ".svn" ) || name . equals ( ".git" ) || name . equals ( ".hg" ) || name . equals ( ".DS_Store" ) || name . endsWith ( "~" ) && name . length ( ) > 1 ; }
returns true if the given file should be ignored ( note : this may not return true for files inside ignored folders , so to determine if a given file should really be ignored you should check all ancestors as well , or only call this as part of a recursive directory traversal )
