code: func (tz *TzArchive) AddDir(dirPath, absPath string) error {
  	dir, err := os.Open(absPath)
  	if err != nil {
  		return err
  	}
  	defer dir.Close()
  
  	tz.AddEmptyDir(dirPath)
  
  	fis, err := dir.Readdir(0)
  	if err != nil {
  		return err
  	}
  	for _, fi := range fis {
  		curPath := strings.Replace(absPath+"/"+fi.Name(), "\\", "/", -1)
  		tmpRecPath := strings.Replace(filepath.Join(dirPath, fi.Name()), "\\", "/", -1)
  		if fi.IsDir() {
  			if err = tz.AddDir(tmpRecPath, curPath); err != nil {
  				return err
  			}
  		} else {
  			if err = tz.AddFile(tmpRecPath, curPath); err != nil {
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: // AddDir adds a directory and subdirectories entries to TzArchive.