code: public Directory getDirectory(String name) {
          synchronized (directories) {
              Directory dir = directories.get(name);
              if (dir == null) {
                  dir = new RAMDirectory();
                  directories.put(name, dir);
              }
              return dir;
          }
      }
docs: {@inheritDoc}