qubx :: tree :: NodeFile :: Class NodeFile
[hide private]
[frames] | no frames]

Class NodeFile

source code

object --+
         |
        NodeFile

Manages a memory-mapped qubtree file, either on disk or an anonymous buffer.

Instance Methods [hide private]
 
__init__(self, path=None, buf=None, capacity=524288, write=True)
Opens a file for qubtree use:
source code
 
close(self) source code
 
flush(self)
Flushes the memory map.
source code
 
alloc(self, block_size) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path=None, buf=None, capacity=524288, write=True)
(Constructor)

source code 

Opens a file for qubtree use:

 if path:
     opens the file, creating if write and not exists, and memory-maps it
 elif buf:
     copies buf into a new anonymous memory map
 else:
     sets up a new anonymous memory map with capacity in bytes
Overrides: object.__init__