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件

2024-03-07 2023-08-09 2023-05-21 2023-05-20 2023-05-04 2022-10-13 2022-07-21 2022-07-02 2022-04-06 2021-11-30 2021-11-26 2021-10-03 2021-09-23 2021-08-15 2021-06-02 2021-01-23 2021-01-21 2021-01-19 2021-01-18 2021-01-16 2021-01-15

人気の10件

今日の10件



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