We introduce the notion of orbit equivalence of directed graphs, following
Matsumoto's notion of continuous orbit equivalence for topological Markov
shifts. We show that two graphs in which every cycle has an exit are orbit
equivalent if and only if there is a diagonal-preserving isomorphism between
their C∗-algebras. We show that it is necessary to assume that every cycle
has an exit for the forward implication, but that the reverse implication holds
for arbitrary graphs. As part of our analysis of arbitrary graphs E we
construct a groupoid G(C∗(E),D(E)) from the graph
algebra C∗(E) and its diagonal subalgebra D(E) which generalises
Renault's Weyl groupoid construction applied to (C∗(E),D(E)). We
show that G(C∗(E),D(E)) recovers the graph groupoid
GE without the assumption that every cycle in E has an exit,
which is required to apply Renault's results to (C∗(E),D(E)). We
finish with applications of our results to out-splittings of graphs and to
amplified graphs.Comment: 27 page