code: protected String[] getLibEntries(String dir)
      {
          String[] entries = new String[0];
          File libdir = new File(dir);
          if (libdir.exists() && libdir.isDirectory())
          {
              entries = libdir.list();
          }
          return entries;
      }
docs: Returns a list of entries in the given directory.  This method is
  separated so that unit tests can override it to return test-friendly
  file names.
  
  @param  dir the dir containing the files to return
  @return the files and directories in the given directory, or
  an empty array if the given directory does not exist or is
  a file.