def load_player(player_uuid): return storage.load_file(config.path.player_file_pattern % convert.uuid_to_base32(player_uuid), entity.new_mobile)
def player_name_exists(player_name): for filename in os.listdir(config.path.player_dir): p = storage.load_file(os.path.join(config.path.player_dir, filename), entity.new_mobile) if p.name == player_name: return True return False
def load_universe(path): """ Load the Universe data stored at the given path. """ return storage.load_file(path, universe.Universe)
def load_user(user_uuid): return storage.load_file(config.path.user_file_pattern % convert.uuid_to_base32(user_uuid), User)
def test_load_file(self): obj = storage.load_file(self.path1, Obj) self.assertTrue(isinstance(obj, Obj)) obj.load_data.assert_called_once_with(self.d1)