Ion transport-related resistive switching in film sandwich structures