tm1filetools.tools package
Classes containing the TM1 File Tool class.
tm1filetools.tools.filetool module
- class tm1filetools.tools.filetool.TM1FileTool(path: Path, local: bool = False)
Bases:
objectTM1 file tool object
- delete(file_object: TM1File) None
Deletes the file specified and updates properties of the file tool object
- Args:
file_object: Instance of a file object to delete
- delete_all_blbs() None
Deletes all blb files
- delete_all_feeders() None
Deletes all feeder files
- delete_all_orphans() None
Deletes all orphan files (rules, attribute dims etc)
- delete_orphan_attr_cubes() None
Deletes all orphan attribute cube files
- delete_orphan_attr_dims() None
Deletes all orphan attribute dim files
- delete_orphan_feeders() None
Deletes all orphan feeder files
- delete_orphan_rules() None
Deletes all orphan rules files
- delete_orphan_subs() None
Deletes all orphan attribute subset files
- delete_orphan_views() None
Deletes all orphan attribute view files
- find_all()
Do a full scan of the dir(s) and populate all lists of files
- get_attr_cubes() List[TM1AttributeCubeFile]
Returns list of all attribute cube files
- Returns:
List of attribute cube files
- get_attr_dims() List[TM1AttributeDimensionFile]
Returns list of all attribute dim files
- Returns:
List of attribute dim files
- get_blbs(model: bool = True, control: bool = False) List[TM1BLBFile]
Returns list of all blb files
- Args:
model: Return model blbs (i.e. not prefixed with “}”) control: Return control blbs (i.e. prefixed with “}”)
- Returns:
List of blb files
- get_chores(model: bool = True, control: bool = False) List[TM1ChoreFile]
Returns list of all chore files
- Args:
model: Return model chores (i.e. not prefixed with “}”) control: Return control chores (i.e. prefixed with “}”)
- Returns:
List of chore files
- get_cmas() List[TM1CMAFile]
Returns list of all cma files
- Returns:
List of cma files
- get_cubes(model: bool = True, control: bool = False) List[TM1CubeFile]
Returns list of all cube files
- Args:
model: Return model cubes (i.e. not prefixed with “}”) control: Return control cubes (i.e. prefixed with “}”)
- Returns:
List of cube files
- get_dims(model: bool = True, control: bool = False) List[TM1DimensionFile]
Returns list of all dimension files
- Args:
model: Return model dims (i.e. not prefixed with “}”) control: Return control dims (i.e. prefixed with “}”)
- Returns:
List of dimension files
- get_feeders(model: bool = True, control: bool = False) List[TM1FeedersFile]
Returns list of all cube feeder files
- Args:
model: Return model cube feeders (i.e. not prefixed with “}”) control: Return control cube feeders (i.e. prefixed with “}”)
- Returns:
List of cube feeder files
- get_logs() List[TM1LogFile]
Returns list of all log files
- Returns:
List of log files
- get_orphan_attr_cubes() List[TM1CubeFile]
Returns list of attribute cube files that don’t have corresponding dim files
- Returns:
List of cube files
- get_orphan_attr_dims() List[TM1DimensionFile]
Returns list of attribute dim files that don’t have corresponding dim files
- Returns:
List of dim files
- get_orphan_feeders() List[TM1FeedersFile]
Returns list of feeder files that don’t have corresponding cube files
- Returns:
List of feeder files
- get_orphan_rules() List[TM1RulesFile]
Returns list of rules files that don’t have corresponding cube files
- Returns:
List of rules files
- get_orphan_subs() List[TM1SubsetFile]
Returns list of subset files that don’t have corresponding dim files
- Returns:
List of subset files
- get_orphan_views() List[TM1ViewFile]
Returns list of view files that don’t have corresponding cube files
- Returns:
List of view files
- get_procs(model: bool = True, control: bool = False) List[TM1ProcessFile]
Returns list of all TI process files
- Args:
model: Return model procs (i.e. not prefixed with “}”) control: Return control procs (i.e. prefixed with “}”)
- Returns:
List of proc files
- get_rules(model: bool = True, control: bool = False) List[TM1RulesFile]
Returns list of all cube rules files
- Args:
model: Return model cube rules (i.e. not prefixed with “}”) control: Return control cube rules (i.e. prefixed with “}”)
- Returns:
List of cube rules files
- get_subs(model: bool = True, control: bool = False) List[TM1SubsetFile]
Returns list of all dimension subset files
- Args:
model: Return model subsets (i.e. not prefixed with “}”) control: Return control subsets (i.e. prefixed with “}”)
- Returns:
List of subset files
- get_views(model: bool = True, control: bool = False) List[TM1ViewFile]
Returns list of all cube view files
- Args:
model: Return model cube views (i.e. not prefixed with “}”) control: Return control cube views (i.e. prefixed with “}”)
- Returns:
List of cube view files
- rename(file_object, new_name: str) None
Renames the file specified and updates properties of the file tool object
- Args:
file_object: Instance of a file object to rename new_name: New name for stem of file object
- suffixes = ['blb', 'cfg', 'cub', 'dim', 'pro', 'cho', 'rux', 'sub', 'vue', 'cma', 'feeders']