  Charm quarks, owing to their large mass, are produced predominantly in the
initial hard scatterings in heavy-ion collisions, and therefore can be a
valuable tool for studying the early time dynamics of these collisions. The
rapidity-odd directed flow at mid-rapidity in heavy-ion collisions originates
from a tilt in the reaction plane of the thermalized medium caused by the
asymmetry between the number of participants from projectile and target nuclei
as a function of rapidity. Recently, it has been predicted that the slope of
the directed flow at mid-rapidity for $D^0$ mesons, arising from the transport
of charm quarks in the tilted medium, can be several times larger than that of
light flavor hadrons. The magnitude of the slope is expected to be sensitive to
the magnitude of the tilt and the charm quark drag coefficient in the medium.
It has also been predicted that the transient electromagnetic field generated
at early time can induce a much larger directed flow for heavy quarks than for
light quarks. In these proceedings, we will report on the first measurement of
the directed flow for the $D^0$ and $\bar{D}^0$ mesons as a function of
rapidity in Au+Au collisions at $\sqrt{s_{_{\rm NN}}}$ = 200 GeV using high
statistics data collected with the Heavy Flavor Tracker in 2014 and 2016 RHIC
runs.
