public static boolean isRegularFile(BasicFileAttributes attr){
  return (attr.isRegularFile() || attr.isOther()) && !attr.isDirectory();
}

public static boolean isRegularFile ( BasicFileAttributes attr ) { return ( attr . isRegularFile ( ) || attr . isOther ( ) ) && ! attr . isDirectory ( ) ; }
this is the tmm variant of isregularfiles ( ) < br > because deduplication creates windows junction points , we check here if it is < br > not a directory , and either a regular file or " other " one . < br > see http : / / serverfault . com / a / 667220
