〜とおり(に)/どおり
Exactly asmachine translation
FormationVerb dictionary form/た-form + とおり(に); noun + の + とおり(に); noun + どおり(に)
〜とおりに means "exactly as, just like": doing something, or something happening, in a way that matches what was said, instructed, or predicted. With verbs: the た-form when the content was said or heard beforehand (先生が言ったとおりに — exactly as the teacher said), the dictionary form when the content is being presented right then (私がするとおりに、してください — please do it just as I'm doing here).
With nouns there are two options: の + とおりに (説明書のとおりに — exactly as the manual says), or attach it directly to the noun with the sound change どおり: 時間どおり (on time), 予定どおり (as planned), 説明書どおり. Phrases like 時間どおり and 予定どおり are used so often you should memorize them as vocabulary.
Distinguish it from にしたがって: にしたがって emphasizes the process of following instructions step by step, while とおりに emphasizes the RESULT matching the model or what was said. The sentence 説明書のとおりに組み立てたのに、動かない complains that the result should have matched but didn't.
Examples
先生が言ったとおりに書いてください。
Please write it exactly as the teacher said.
説明書のとおりに組み立てたのに、動きません。
I assembled it exactly as the manual said, but it doesn't work.
電車は時間どおりに駅に着きました。
The train arrived at the station right on time.