def dir_clone(self, dir_path):
        if not os.path.exists(dir_path):
            self.stdout.write("Path %s does not exist !!" % dir_path)
            return None

        tempdir = self.create_session()
        if tempdir is not None:
            os.system("cp %s/*.yang %s" % (dir_path, tempdir))

        return tempdir
Create a fake session and copy user files
dataset/ETHPy150Open CiscoDevNet/yang-explorer/server/explorer/management/commands/bulkupload.py/Command.dir_clone