Check if file copy was successful

copy, file, php

Solution

This would be enough no?

if (!copy($file, $newfile)) {
    echo "failed to copy $file...\n";
}

ref: http://php.net/manual/en/function.copy.php

Problem

After running the command `copy($uploadedFile, "pdf/".$fullFileName);`, what would be the quickest and most efficient way to verify that the file copied successfully?

Original source