private void createFiles(File path, File rel)
  	throws DBException
  {
   if (path.isDirectory())
   {
    for (String name : path.list())
     createFiles(new File(path, name), new File(rel, name));
   }
   if (null != rel && !path.isDirectory())
   {
    NodeNameDTO node = nameDAO.find(rel, false);
    if (null == node)
     throw new IllegalStateException("Missing node for file " + rel);
    if ((1 + fileCount) % 5 == 0)
    {
     FileDTO file = new FileDTO();
     file.setNameId(node.getId());
     fileDAO.insert(file);
     VersionDTO mark = VersionDTO.newDeletionMark(file, new java.sql.Timestamp(System.currentTimeMillis()));
     versionDAO.insert(mark);
     file.setCurrentVersionId(mark.getId());
     fileDAO.update(file);
    }
    if ((1 + fileCount) % 10 != 0)
    {
     FileDTO file = new FileDTO();
     file.setNameId(node.getId());
     fileDAO.insert(file);
     VersionDTO version = new VersionDTO(file);
     version.setModifiedTime(new java.sql.Timestamp(System.currentTimeMillis()));
     version.setSize(0);
     versionDAO.insert(version);
     file.setCurrentVersionId(version.getId());
     fileDAO.update(file);
    }
    files.put(rel, node);
    fileCount++;
   }
  }