code: func validatePath(targetPath string) error {
  	// TODO: somehow unify this with the similar api validation,
  	// validateVolumeSourcePath; the error semantics are just different enough
  	// from this that it was time-prohibitive trying to find the right
  	// refactoring to re-use.
  	if targetPath == "" {
  		return fmt.Errorf("invalid path: must not be empty: %q", targetPath)
  	}
  	if path.IsAbs(targetPath) {
  		return fmt.Errorf("invalid path: must be relative path: %s", targetPath)
  	}
  
  	if len(targetPath) > maxPathLength {
  		return fmt.Errorf("invalid path: must be less than or equal to %d characters", maxPathLength)
  	}
  
  	items := strings.Split(targetPath, string(os.PathSeparator))
  	for _, item := range items {
  		if item == ".." {
  			return fmt.Errorf("invalid path: must not contain '..': %s", targetPath)
  		}
  		if len(item) > maxFileNameLength {
  			return fmt.Errorf("invalid path: filenames must be less than or equal to %d characters", maxFileNameLength)
  		}
  	}
  	if strings.HasPrefix(items[0], "..") && len(items[0]) > 2 {
  		return fmt.Errorf("invalid path: must not start with '..': %s", targetPath)
  	}
  
  	return nil
  }
docs: // validatePath validates a single path, returning an error if the path is
  // invalid.  paths may not:
  //
  // 1. be absolute
  // 2. contain '..' as an element
  // 3. start with '..'
  // 4. contain filenames larger than 255 characters
  // 5. be longer than 4096 characters