Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
A diode doesn't control the direction of current. It just only lets current flow one way.
But there are other devices that do only allow current to flow one way through them. You can wire up a MOSFETs to do something similar. This is often used for reverse-polarity protection where the voltages are so low that a diode voltage drop cannot be tolerated. Diacs and thyristors also only let current flow in one direction (but has other quirks).
I was assuming the OP had an AC power source and was looking for an alternative to a diode to, as you put it, "let current flow one way". I was hoping you would show how your answer, "MOSFET" replaces a diode in a circuit that needs a diode.