@@ -4,8 +4,6 @@ Simple file system API for iOS & Android, for dealing with text-files.
4
4
All interaction is promise-based, and all content is
5
5
written and read as UTF-8.
6
6
7
- This library is still under development, and only works on iOS at the current moment.
8
-
9
7
## Setup
10
8
11
9
npm install react-native-filesystem --save
@@ -55,7 +53,7 @@ async function checkIfFileExists() {
55
53
}
56
54
```
57
55
58
- ### Selecting storage class
56
+ ### Selecting a storage class
59
57
60
58
All commands also take an optional last argument specifying a storage class.
61
59
These classes roughly correspond to the four points of the
@@ -75,27 +73,27 @@ The default. Files stored in this location will automatically be backed up by iC
75
73
[ Auto Backup for Apps] ( https://developer.android.com/guide/topics/data/autobackup.html ) on Android
76
74
devices running Marshmallow or newer (6.0+). This is where you'd want to put user generated content.
77
75
78
- Corresponds to ` <Application_Home>/Documents ` on iOS and
76
+ Corresponds to ` <Application_Home>/Documents ` on iOS and a subdirectory of
79
77
[ Context.getFilesDir()] ( https://developer.android.com/reference/android/content/Context.html#getFilesDir() )
80
78
on Android.
81
79
82
80
#### storage.important
83
81
84
- This is for files that are possible to re-generate / re-download, but are still important to keep
82
+ For files that are possible to re-generate / re-download, but are still important to keep
85
83
around during low storage situations. F.ex. offline maps. The system will almost always keep these
86
84
files around.
87
85
88
86
Corresponds to ` <Application_Home>/Library/Caches ` with "do not backup" flag on iOS, and a
89
87
subdirectory of
90
88
[ Context.getFilesDir()] ( https://developer.android.com/reference/android/content/Context.html#getFilesDir() )
91
- on Android.
89
+ excluded from backup on Android.
92
90
93
91
#### storage.auxiliary
94
92
95
- This storage class is for files that can be re-created, and that the app can live without. On
93
+ For files that can be re-created, and that the app can live without. On
96
94
Android this storage behaves the same as ` storage.important ` , but on iOS the system can delete
97
95
these files in low storage situations. To play it safe, you should gracefully handle the case where
98
- they are gone, by checking their existence.
96
+ they are gone, by checking for their existence.
99
97
100
98
Corresponds to ` <Application_Home>/Library/Caches ` on iOS, and a subdirectory of
101
99
[ Context.getFilesDir()] ( https://developer.android.com/reference/android/content/Context.html#getFilesDir() )
@@ -104,7 +102,7 @@ explicitly excluded from backup on Android.
104
102
105
103
#### storage.temporary
106
104
107
- Location for temporary caches and data. The system can get rid of these at any time, but you are
105
+ For temporary caches and data. The system can get rid of these at any time, but you are
108
106
still required to delete them manually to free up space when they are no longer in use.
109
107
110
108
Corresponds to ` <Application_Home>/tmp ` on iOS and
0 commit comments