code: public boolean rename(String from, String to) {
          synchronized (directories) {
              if (directories.containsKey(to)) {
                  return false;
              }
              Directory dir = directories.remove(from);
              if (dir == null) {
                  return false;
              }
              directories.put(to, dir);
              return true;
          }
      }
docs: {@inheritDoc}