Package pyffi :: Package formats :: Package rockstar :: Package dir_ :: Class DirFormat :: Class Data
[hide private]
[frames] | no frames]

Class Data

source code

            object --+            
                     |            
utils.graph.DetailNode --+        
                         |        
    utils.graph.GlobalNode --+    
                             |    
 object_models.FileFormat.Data --+
                                 |
                                DirFormat.Data

A class to contain the actual dir data.
Instance Methods [hide private]
 
__init__(self, folder=None)
Initialize empty file list, or take list of files from a folder.
source code
 
inspect_quick(self, stream)
Quickly checks if stream contains DIR data, by looking at the first 36 bytes.
source code
 
inspect(self, stream)
Quickly checks if stream contains DIR data.
source code
 
read(self, stream)
Read a dir file.
source code
 
write(self, stream)
Write a dir file.
source code
 
get_global_child_nodes(self, edge_filter=(True, True))
Generator which yields all children of this item in the global view, of given edge type (default is edges of type 0).
source code
 
unpack(self, image, folder)
Unpack all files, whose data resides in the given image, into the given folder.
source code
 
pack(self, image, folder)
Pack all files, whose data resides in the given folder, into the given image.
source code

Inherited from utils.graph.GlobalNode: get_global_child_edge_types, get_global_display, get_global_iterator

Inherited from utils.graph.DetailNode: get_detail_child_edge_types, get_detail_child_names, get_detail_child_nodes, get_detail_display, get_detail_iterator, replace_global_node

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

Class Variables [hide private]

Inherited from object_models.FileFormat.Data: user_version, version

Inherited from object_models.FileFormat.Data (private): _byte_order

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, folder=None)
(Constructor)

source code 
Initialize empty file list, or take list of files from a folder.
Overrides: object.__init__

inspect_quick(self, stream)

source code 
Quickly checks if stream contains DIR data, by looking at the first 36 bytes.
Parameters:
  • stream (file) - The stream to inspect.

inspect(self, stream)

source code 
Quickly checks if stream contains DIR data.
Parameters:
  • stream (file) - The stream to inspect.
Returns:
True if stream is of particular format, False otherwise.
Overrides: object_models.FileFormat.Data.inspect

read(self, stream)

source code 
Read a dir file.
Parameters:
  • stream (file) - The stream from which to read.
Overrides: object_models.FileFormat.Data.read

write(self, stream)

source code 
Write a dir file.
Parameters:
  • stream (file) - The stream to which to write.
Overrides: object_models.FileFormat.Data.write

get_global_child_nodes(self, edge_filter=(True, True))

source code 

Generator which yields all children of this item in the global view, of given edge type (default is edges of type 0).

Override this method.

Returns:
Generator for global node children.
Overrides: utils.graph.GlobalNode.get_global_child_nodes
(inherited documentation)