Game Maker Language リファレンス > 組み込み関数 用途別 > ファイル操作・レジストリ・シェル機能・コマンドライン関連 > file_exists
file_exists() †
- 対応:5.3A
6.0
6.1A
7.0
- lite OK
書式 †
file_exists(fname)
- fname
- ファイル名、またはパスを含むファイル名
戻り値 †
ファイルが存在すればtrue。しなければfalse。
機能 †
指定したファイルが存在するかどうかを調べ、存在すればtrue、しなければfalseを返します。
通常、エディタから起動した場合はソースファイルの、実行形式で起動した場合はそれと同一のフォルダ内を調べます。
フルパス名で指定した場合は、その場所を調べます。
Example †
if (file_exists("hoge.txt")) {
fid = file_open_text_append("hoge.txt");
} else {
fid = file_open_text_write("hoge.txt");
}
Wiki内検索
#search(): You already view a search box
MENU
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件
これまでの訪問者: 2832
今日の訪問者: 2
昨日の訪問者: 2
閲覧者: 3