func WriteFile(path string, file []byte) error {
	pathErr := EnsureDirAll(filepath.Dir(path))
	if pathErr != nil {
		return fmt.Errorf("cannot ensure path %s", pathErr)
	}

	err := os.WriteFile(path, file, 0755)
	if err != nil {
		return fmt.Errorf("write error for thumbnail %s: %s ", path, err)
	}
	return nil
}
// WriteFile writes file to path creating parent directories if needed
WriteFile writes file to path creating parent directories if needed
// WriteFile writes file to path creating parent directories if needed
func WriteFile(path string, file []byte) error {
	pathErr := EnsureDirAll(filepath.Dir(path))
	if pathErr != nil {
		return fmt.Errorf("cannot ensure path %s", pathErr)
	}
	err := os.WriteFile(path, file, 0755)
	if err != nil {
		return fmt.Errorf("write error for thumbnail %s: %s ", path, err)
	}
	return nil
}
func WriteFile ( path string , file [ ] byte ) error { pathErr := EnsureDirAll ( filepath . Dir ( path ) ) if pathErr != nil { return fmt . Errorf ( " " , pathErr ) } err := os . WriteFile ( path , file , 0755 ) if err != nil { return fmt . Errorf ( " " , path , err ) } return nil }
WriteFile writes file to path creating parent directories if needed
WriteFile writes file to path creating parent directories if needed