teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

誤記修正。

2020/05/04 15:32

投稿

tsuchin
tsuchin

スコア16

answer CHANGED
@@ -4,13 +4,14 @@
4
4
  質問の表現が悪かった部分もあり、回答が難しかったと思います。申し訳ありませんでした。
5
5
  間違いやアドバイス在りましたらコメント頂けたら幸いです。
6
6
 
7
+ 以下の記述で動作しました。
7
8
  ```java
8
9
  String fileName = "test.txt";
9
10
  File file = getApplicationContext().getFileStreamPath(fileName);
10
11
  boolean exist = file.exists(); // true or false
11
12
  ```
12
13
 
13
- ・getFileStreamPath、openFileOutput(String, int)でファイルを作成するフォルダの絶対パスを返す。
14
+ ・getFileStreamPath、openFileOutput(String, int)でファイルを作成するフォルダの絶対パスを返す。
14
15
  ・openFileOutput(String, int)でファイルを作成するフォルダは、基本的には作成したアプリケーション専用のローカルファイル。
15
16
 
16
17
  [https://developer.android.com/reference/android/content/Context](https://developer.android.com/reference/android/content/Context)