public boolean isDirectory(){
  return name.endsWith("/");
}

public boolean isDirectory ( ) { return name . endsWith ( "/" ) ; }
returns true if this is a directory entry . a directory entry is defined to be one whose name ends with a ' / ' .
