I meant call the parent method only if $path1 is a folder. Otherwise you can use the internal copy method for files.