A diode allows the flow of current in one direction only. So it acts like a closed switch(with some resistance) in one direction called forward bias