working_directory


ファイル操作・レジストリ・シェル機能・コマンドライン関連

working_directory

ファイルを読み書きできる作業用のローカルストレージとなるフォルダを取得します

構文

working_directory

戻り値

String.
作業フォルダのパス

説明

Working_directory can actually return two different values depending on what you are using it for. If you are writing a file to disk, working_directory points to the area of local storage that is reserved for your game on the target device (in windows this is "%LOCALAPPDATA%/gamedir/" where the "gamedir" is the directory with the name of your game). However, when reading from disk, working_directory can be either the local storage or the area where the included files are stored.

For example, if you have a default *.txt file included with your game and read it into memory using working_directory, then that file will be taken from the area where the included files are stored. If you then choose to write that information to a text file using working_directory, this will write the file to the target platforms local storage, where it will be read from the next time unless you instruct GameMaker: Studio to delete the file, in which case working_directory will once more point to the area where the included files are stored.

注意

WARNING! This function may not work as you expect due to GameMaker: Studio being sandboxed! Please see the section on File System Limits for more information.


ini_open(working_directory + "\temp_ini.ini");

This will open an ini file from the working directory of the game (creating it if it does not already exist). This could be the local storage, or the area where the included files are depending on whether the file being looked for exists in either place.

Wiki内検索

#search(): You already view a search box

MENU

ドキュメント

GMLリファレンス

2ch

その他



最新の30件

2019-09-27 2019-07-28 2019-07-12 2018-11-17 2017-11-07 2017-10-26 2017-10-01 2017-05-13 2016-10-01 2017-01-22 2017-01-14 2016-12-25 2016-10-09 2016-09-21 2016-08-29 2016-06-21 2016-02-23 2016-02-10 2016-01-18 2015-10-30 2015-10-20 2015-06-23 2015-06-20 2015-06-19 2015-06-10

人気の10件

今日の10件



これまでの訪問者: 872
今日の訪問者: 1
昨日の訪問者: 0
閲覧者: 3