当前位置: 首页>>代码示例>>Python>>正文


Python Block.write方法代码示例

本文整理汇总了Python中Block.Block.write方法的典型用法代码示例。如果您正苦于以下问题:Python Block.write方法的具体用法?Python Block.write怎么用?Python Block.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Block.Block的用法示例。


在下文中一共展示了Block.write方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
  def write(self):
    self._create_data()
    
    # hash table
    self._put_long(3, self.hash_size)
    for i in xrange(self.hash_size):
      self._put_long(6+i, self.hash_table[i])
    
    # bitmap
    self._put_long(-50, self.bitmap_flag)
    for i in xrange(25):
      self._put_long(-49+i, self.bitmap_ptrs[i])
    self._put_long(-24, self.bitmap_ext_blk)
    
    # timestamps
    self._put_timestamp(-23, self.mod_ts)
    self._put_timestamp(-10, self.disk_ts)
    self._put_timestamp(-7, self.create_ts)
    
    # name
    self._put_bstr(-20, 30, self.name)
    self._put_long(-2, self.extension)
    
    # DOS6 and DOS7 stuff
    self._put_long(-11, self.blocks_used)
    self._put_long(-4, self.fstype)

    Block.write(self)
开发者ID:,项目名称:,代码行数:30,代码来源:

示例2: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.hdr_key)
   self._put_long(2, self.seq_num)
   self._put_long(3, self.data_size)
   self._put_long(4, self.next_data)
   if self.contents != None:
     self.data[24:24+self.data_size] = self.contents
   Block.write(self)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:11,代码来源:FileDataBlock.py

示例3: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(2, self.block_count)
   
   # data blocks
   for i in xrange(len(self.data_blocks)):
     self._put_long(-51-i, self.data_blocks[i])
   
   self._put_long(-3, self.parent)
   self._put_long(-2, self.extension)
   Block.write(self)
开发者ID:Belxjander,项目名称:amitools,代码行数:14,代码来源:FileListBlock.py

示例4: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(2, self.parent)
   self._put_long(3, self.num_records)
   self._put_long(4, self.next_cache)
   
   # put records
   off = 24
   for r in self.records:
     off = r.put(self.data, off)
   
   Block.write(self)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:15,代码来源:DirCacheBlock.py

示例5: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(-48, self.protect)
   self._put_bstr(-46, 79, self.comment)
   self._put_timestamp(-23, self.mod_ts)
   self._put_bstr(-20, 30, self.name)
   self._put_long(-4, self.hash_chain)
   self._put_long(-3, self.parent)
   # hash table
   for i in xrange(self.hash_size):
     self._put_long(6+i, self.hash_table[i])
   Block.write(self)
开发者ID:moggen,项目名称:amitools,代码行数:15,代码来源:UserDirBlock.py

示例6: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(2, self.block_count)
   self._put_long(4, self.first_data)
   
   # data blocks
   for i in xrange(len(self.data_blocks)):
     self._put_long(-51-i, self.data_blocks[i])
   
   self._put_long(-48, self.protect)
   self._put_long(-47, self.byte_size)
   self._put_bstr(-46, 79, self.comment)
   self._put_timestamp(-23, self.mod_ts)
   self._put_bstr(-20, 30, self.name)
   self._put_long(-4, self.hash_chain)
   self._put_long(-3, self.parent)
   self._put_long(-2, self.extension)
   Block.write(self)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:21,代码来源:FileHeaderBlock.py

示例7: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import write [as 别名]
 def write(self):
   for i in xrange(self.blkdev.block_longs-1):
     self._put_long(i, self.bitmap_ptrs[i])
   self._put_long(-1, self.bitmap_ext_blk)
   Block.write(self)
开发者ID:moggen,项目名称:amitools,代码行数:7,代码来源:BitmapExtBlock.py


注:本文中的Block.Block.write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。