'Copies a resource file to the bundle/Resources directory, performing any
necessary compilation on each resource.'

def ExecCopyBundleResource(self, source, dest, convert_to_binary):

    extension = os.path.splitext(source)[1].lower()
    if os.path.isdir(source):
        if os.path.exists(dest):
            shutil.rmtree(dest)
        shutil.copytree(source, dest)
    elif (extension == '.xib'):
        return self._CopyXIBFile(source, dest)
    elif (extension == '.storyboard'):
        return self._CopyXIBFile(source, dest)
    elif (extension == '.strings'):
        self._CopyStringsFile(source, dest)
    else:
        try:
            if os.path.isfile(dest):
                os.unlink(dest)
            os.link(source, dest)
        except OSError as e:
            if (e.errno == errno.EXDEV):
                shutil.copy(source, dest)
            else:
                raise
    if ((extension in ('.plist', '.strings')) and (convert_to_binary == 'True')):
        self._ConvertToBinary(dest)
