def _create_ondisk_files(self, df_mgr, obj_name, policy, timestamp,
                             frag_indexes=None, commit=True):
        frag_indexes = [None] if frag_indexes is None else frag_indexes
        metadata = {'Content-Type': 'plain/text'}
        diskfiles = []
        for frag_index in frag_indexes:
            object_data = '/a/c/%s___%s' % (obj_name, frag_index)
            if frag_index is not None:
                metadata['X-Object-Sysmeta-Ec-Frag-Index'] = str(frag_index)
            df = self._make_diskfile(
                device=self.device, partition=self.partition, account='a',
                container='c', obj=obj_name, body=object_data,
                extra_metadata=metadata, timestamp=timestamp, policy=policy,
                frag_index=frag_index, df_mgr=df_mgr, commit=commit)
            if commit:
                df.open()
                # sanity checks
                listing = os.listdir(df._datadir)
                self.assertTrue(listing)
                for filename in listing:
                    self.assertTrue(filename.startswith(timestamp.internal))
            diskfiles.append(df)
        return diskfiles
dataset/ETHPy150Open openstack/swift/test/unit/obj/test_ssync.py/TestBaseSsync._create_ondisk_files/original