Esempio n. 1
0
 def roms_for_console(self, config, console):
     """
 @param console - A console object
 @returns A list of ROM objects representing all of the valid ROMs for a
          given console.
 Valid ROMs are defined as ROMs for which the function `path_is_rom` returns
 True when given the console.
 Returns an empty list if `console` is not enabled
 """
     roms_directory = consoles.console_roms_directory(config, console)
     logger.debug("[%s] Using `%s` as ROMs directory" %
                  (console.shortname, roms_directory))
     return self._search(roms_directory, console)
Esempio n. 2
0
  def roms_for_console(self, config, console):
    """
    @param console - A console object
    @returns A list of ROM objects representing all of the valid ROMs for a
             given console.

    Valid ROMs are defined as ROMs for which the function `path_is_rom` returns
    True when given the console.

    Returns an empty list if `console` is not enabled
    """
    roms_directory = consoles.console_roms_directory(config, console)
    logger.debug("[%s] Using `%s` as ROMs directory" % (console.shortname, roms_directory))
    return self._search(roms_directory, console)
Esempio n. 3
0
  def roms_for_console(self, console):
    """
    @param console - A console object
    @returns A list of ROM objects representing all of the valid ROMs for a
             given console.

    Valid ROMs are defined as ROMs for which the function `path_is_rom` returns
    True when given the console.

    Returns an empty list if `console` is not enabled
    """
    roms_directory = consoles.console_roms_directory(self.config, console)
    logger.debug("[%s] Using `%s` as ROMs directory" % (console.shortname, roms_directory))
    paths = self.filesystem.files_in_directory(roms_directory, include_subdirectories=True)
    logger.debug("[%s] Files in ROMs directory: %s" % (console.shortname, paths))
    valid_rom_paths = filter(partial(consoles.path_is_rom, console), paths)
    logger.debug("[%s] Filtered list of paths to ROMs: %s" % (console.shortname, valid_rom_paths))
    return map(partial(self.rom_for_path, console), valid_rom_paths)
Esempio n. 4
0
    def roms_for_console(self, console):
        """
    @param console - A console object
    @returns A list of ROM objects representing all of the valid ROMs for a
             given console.

    Valid ROMs are defined as ROMs for which the function `path_is_rom` returns
    True when given the console.

    Returns an empty list if `console` is not enabled
    """
        roms_directory = consoles.console_roms_directory(self.config, console)
        logger.debug("[%s] Using `%s` as ROMs directory" %
                     (console.shortname, roms_directory))
        paths = self.filesystem.files_in_directory(roms_directory,
                                                   include_subdirectories=True)
        logger.debug("[%s] Files in ROMs directory: %s" %
                     (console.shortname, paths))
        valid_rom_paths = filter(partial(consoles.path_is_rom, console), paths)
        logger.debug("[%s] Filtered list of paths to ROMs: %s" %
                     (console.shortname, valid_rom_paths))
        return map(partial(self.rom_for_path, console), valid_rom_paths)
 def shortcut_is_managed_by_console(console):
   return consoles.console_roms_directory(config, console) in shortcut.exe
Esempio n. 6
0
 def shortcut_is_managed_by_console(console):
     return console_roms_directory(self.config, console) in shortcut.exe