当前位置: 首页>>代码示例>>Python>>正文


Python FSGSDirectories.get_data_dir方法代码示例

本文整理汇总了Python中fsgs.FSGSDirectories.FSGSDirectories.get_data_dir方法的典型用法代码示例。如果您正苦于以下问题:Python FSGSDirectories.get_data_dir方法的具体用法?Python FSGSDirectories.get_data_dir怎么用?Python FSGSDirectories.get_data_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fsgs.FSGSDirectories.FSGSDirectories的用法示例。


在下文中一共展示了FSGSDirectories.get_data_dir方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: app_main

# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_data_dir [as 别名]
def app_main():
    FSGSDirectories.initialize()
    Settings.instance().load()
    print("")
    print("Directories:")
    print("* base_dir =", FSGSDirectories.get_base_dir())
    print("* cache_dir =", FSGSDirectories.get_cache_dir())
    print("* cdroms_dir =", FSGSDirectories.get_cdroms_dir())
    print("* configurations_dir =", FSGSDirectories.get_configurations_dir())
    print("* controllers_dir =", FSGSDirectories.get_controllers_dir())
    print("* covers_dir =", FSGSDirectories.get_covers_dir())
    print("* data_dir =", FSGSDirectories.get_data_dir())
    print("* downloads_dir =", FSGSDirectories.downloads_dir())
    print("* floppies_dir =", FSGSDirectories.get_floppies_dir())
    print("* hard_drives_dir =", FSGSDirectories.get_hard_drives_dir())
    # print("* images_dir =", FSGSDirectories.get_images_dir())
    print("* kickstarts_dir =", FSGSDirectories.get_kickstarts_dir())
    print("* launcher_dir =", FSGSDirectories.get_launcher_dir())
    print("* logs_dir =", FSGSDirectories.get_logs_dir())
    print("* plugins_dir =", FSGSDirectories.get_plugins_dir())
    # print("* portable_dir =", FSGSDirectories.portable_dir())
    print("* save_states_dir =", FSGSDirectories.get_save_states_dir())
    print("* screenshots_dir =", FSGSDirectories.get_screenshots_dir())
    print("* screenshots_output_dir =", FSGSDirectories.screenshots_output_dir())
    print("* themes_dir =", FSGSDirectories.get_themes_dir())
    print("* titles_dir =", FSGSDirectories.get_titles_dir())
    print("* whdload_dir =", FSGSDirectories.get_whdload_dir())
    print("")
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:30,代码来源:list_dirs.py

示例2: default_openretro_server_from_file

# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_data_dir [as 别名]
def default_openretro_server_from_file():
    server = None
    p = os.path.join(
        FSGSDirectories.get_data_dir(), "Settings", "database-server")
    if os.path.exists(p):
        with open(p, "r", encoding="UTF-8") as f:
            server = f.read().strip()
    return server
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:10,代码来源:network.py

示例3: get_settings_path

# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_data_dir [as 别名]
    def get_settings_path(self):
        settings_ini = os.path.join(FSGSDirectories.get_data_dir(),
                                    "Settings.ini")
        if not os.path.exists(settings_ini):
            migrate_list = [os.path.join(FSGSDirectories.get_data_dir(),
                                         "FS-UAE Launcher.ini")]
            portable_ini = os.path.join(FSGSDirectories.get_base_dir(),
                                        "Portable.ini")
            if not os.path.exists(portable_ini):
                # not portable, can migrate settings from old
                # launcher.settings file
                migrate_list.append(os.path.join(
                    get_data_dir(), "fs-uae", "launcher.settings"))
            # move the highest-priority settings file if present
            for migrate in migrate_list:
                if os.path.exists(migrate):
                    shutil.move(migrate, settings_ini)
                    break
            # remove all old settings files
            for migrate in migrate_list:
                if os.path.exists(migrate):
                    os.remove(migrate)

        return settings_ini
开发者ID:EdwardBetts,项目名称:fs-uae-launcher,代码行数:26,代码来源:application.py

示例4: configure_gus

# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_data_dir [as 别名]
 def configure_gus(self, f):
     f.write("\n[gus]\n")
     if self.options[Option.DOSBOX_GUS_GUS].lower() == "true":
         f.write("gus=true\n")
         f.write("ultradir=U:\\ULTRASND\n")
         ultrasnd_drive = os.path.join(self.drives_dir.path, "U")
         source_dir = os.path.join(
             FSGSDirectories.get_data_dir(), "ULTRASND"
         )
         dest_dir = os.path.join(ultrasnd_drive, "ULTRASND")
         if os.path.exists(source_dir):
             shutil.copytree(source_dir, dest_dir)
         else:
             # FIXME: ADD ULTRASND WARNING
             pass
开发者ID:,项目名称:,代码行数:17,代码来源:

示例5: get_config_files

# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_data_dir [as 别名]
    def get_config_files():
        print("get_config_files")
        configs = {}
        input_stream = Resources("fsgs").stream("res/input/manifest.txt")
        print("opened input manifest")
        for line in input_stream.read().split(b"\n"):
            line = line.decode("UTF-8")
            path = line.strip()
            if not path:
                continue
            _, ext = os.path.splitext(path)
            if ext in [".ini", ".conf"]:
                parts = path.split("/")
                file_name = parts[-1]
                name, _ = os.path.splitext(file_name)
                if len(parts) > 1:
                    configs[parts[-2] + "_" + name] = "fsgs:res/input/" + path
                # print(" -", path)
                configs[name] = "fsgs:res/input/" + path

        # FIXME: fix dependency
        controllers_dir = fsgs.amiga.get_controllers_dir()
        print("read configs from controllers_dir at", controllers_dir)
        if os.path.exists(controllers_dir):
            for file_name in os.listdir(controllers_dir):
                if file_name.endswith(".conf"):
                    name, ext = os.path.splitext(file_name)
                    path = os.path.join(controllers_dir, file_name)
                    print(" -", path)
                    configs[name] = path
        keyboards_dir = os.path.join(
            FSGSDirectories.get_data_dir(), "Devs", "Keyboards"
        )
        print("read configs from controllers_dir at", keyboards_dir)
        if os.path.exists(keyboards_dir):
            for file_name in os.listdir(keyboards_dir):
                if file_name.endswith(".ini"):
                    name, ext = os.path.splitext(file_name)
                    path = os.path.join(keyboards_dir, file_name)
                    print(" -", path)
                    configs[name] = path

        # print("input config files:", configs)
        return configs
开发者ID:,项目名称:,代码行数:46,代码来源:

示例6: path

# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_data_dir [as 别名]
 def path(self):
     return os.path.join(FSGSDirectories.get_data_dir(), "MAME", "Artwork")
开发者ID:FrodeSolheim,项目名称:fs-uae-launcher,代码行数:4,代码来源:mamedriver.py


注:本文中的fsgs.FSGSDirectories.FSGSDirectories.get_data_dir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。