Unity Interview Question

Write a function to copy files from one dir to another in a transactional manner.