保存对配置文件路径的引用

时间:2017-06-01 18:49:31

标签: configuration config configuration-files

如何在程序运行之间将自定义文件路径(由用户选择)保存到程序的配置文件中?

例如:

First time running program:

  User:     *opens program for first time*
  Program:  "What is the path to the configuration file for me?"
  User:     *choses path* "Right *here*."
  Program:  "OK, loading configuration file..."
  User:     *closes program*


Running the program a second time:

  User:     *opens program*
  Program:  "What is the path to the configuration file for me?"
  User:     "Why don't you remember?"

如何解决此问题?

显然我无法将配置文件的路径存储在配置文件中,这没有任何意义。所以问题就在于:我可以在哪里存储用户选择的配置文件路径?

0 个答案:

没有答案