begin to test path and add method to check type

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-10-04 16:32:43 +02:00
commit 6c22867fc2
3 changed files with 93 additions and 0 deletions

View file

@ -175,8 +175,14 @@ class Path:
return list
def list_types(self):
"""Retuns list of types"""
return os.listdir(self.type_base_dir)
def is_install_type(self, type):
"""Check whether a type is used for installation (if not: for configuration)"""
marker = os.path.join(self.type_dir(type), "install")
return os.path.isfile(marker)
def list_object_paths(self, starting_point):
"""Return list of paths of existing objects"""
object_paths = []