def use_lambda_file(self,lambda_file): file_path = Files.path_combine(self.get_root_folder(), lambda_file) if Files.exists(file_path) is False: return { 'status': 'error', 'data': 'could not find lambda file `{0}` in root folder `{1}`'.format(lambda_file, self.get_root_folder())} target_file = Files.path_combine(self.tmp_folder, '{0}.py'.format(self.lambda_name)) Files.copy(file_path,target_file) return { 'status': 'ok', 'file_path': file_path, 'target_file': target_file }
def add_file(self, source): Files.copy(source, self.tmp_folder)