def merge(self, target, ignoreRootDir=False):
        if os.path.isfile(target):
            self.files[os.path.basename(target)] = target
        elif os.path.isdir(target):
            for dirname, dirnames, filenames in os.walk(target):
                for filename in filenames:
                    path = os.path.join(dirname, filename)
                    if ignoreRootDir:
                        ziploc = path.lstrip(target).lstrip("/")
                    else:
                        ziploc = path
                    self.files[ziploc] = path
        else:
            raise ValueError("'%s' is not a file or directory." % target)
        if len(self.files) == 1:
            for dest, loc in self.files.items():
                self.executable = dest
dataset/ETHPy150Open iron-io/iron_worker_python/iron_worker.py/CodePackage.merge/original