ResourceManager
A singleton used to manage Resources
Category: Resources
Base class: _BlipValue
Properties
isSaveAllAllowed : bool
package : IFilesystem (Read-Only)
Methods
allResources(self, type: type[resourceT]) -> List[resourceT]
checkForCorruption(self)
emptyTrash(self, trashedResources: List[Resource])
exists(self, path: Path) -> bool
getMostRecentUserVisibleResourceOfType(self, type: type[resourceT]) -> resourceT
load(self, path: Path, expectedType: type[resourceT] = Resource) -> resourceT
loadOrCreate(self, pathNeeded: Path, expectedType: type[resourceT]) -> resourceT
Load an existing Resource, or create a new Resource
Parameters:
- pathNeeded: A string containing the path for the Resource, formatted as follows ‘objects/{type}/{name}.apx’
- expectedType: The type of the Resource being created, written in PascalCase and passed as a raw Type, NOT as a String, e.g. ResourceManager
Returns resource: The Resource loaded or created by the function
remove(self, path: Path)
saveAll(self) -> int
search(self, match: str) -> List[str]
Static Methods
get() -> ResourceManager
An existing singleton instance of the ResourceManager, available globally