code: func (u *CopyOnWriteFs) Open(name string) (File, error) {
  	// Since the overlay overrides the base we check that first
  	b, err := u.isBaseFile(name)
  	if err != nil {
  		return nil, err
  	}
  
  	// If overlay doesn't exist, return the base (base state irrelevant)
  	if b {
  		return u.base.Open(name)
  	}
  
  	// If overlay is a file, return it (base state irrelevant)
  	dir, err := IsDir(u.layer, name)
  	if err != nil {
  		return nil, err
  	}
  	if !dir {
  		return u.layer.Open(name)
  	}
  
  	// Overlay is a directory, base state now matters.
  	// Base state has 3 states to check but 2 outcomes:
  	// A. It's a file or non-readable in the base (return just the overlay)
  	// B. It's an accessible directory in the base (return a UnionFile)
  
  	// If base is file or nonreadable, return overlay
  	dir, err = IsDir(u.base, name)
  	if !dir || err != nil {
  		return u.layer.Open(name)
  	}
  
  	// Both base & layer are directories
  	// Return union file (if opens are without error)
  	bfile, bErr := u.base.Open(name)
  	lfile, lErr := u.layer.Open(name)
  
  	// If either have errors at this point something is very wrong. Return nil and the errors
  	if bErr != nil || lErr != nil {
  		return nil, fmt.Errorf("BaseErr: %v\nOverlayErr: %v", bErr, lErr)
  	}
  
  	return &UnionFile{Base: bfile, Layer: lfile}, nil
  }
docs: // This function handles the 9 different possibilities caused
  // by the union which are the intersection of the following...
  //  layer: doesn't exist, exists as a file, and exists as a directory
  //  base:  doesn't exist, exists as a file, and exists as a directory