code: public String[] getDirectoryNames() throws IOException {
          synchronized (directories) {
              return (String[]) directories.keySet().toArray(
                      new String[directories.size()]);
          }
      }
docs: {@inheritDoc}