Skip to content

Commit 491ee1d

Browse files
author
Preben Ludviksen
committed
Added documentation for new absolutePath-method.
1 parent 44bf37f commit 491ee1d

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ written and read as UTF-8.
1111

1212
## Usage
1313

14-
For a full list of available methods, see the [API Reference](docs/reference.md)
14+
For a full list of available methods, see the [API Reference](docs/reference.md).
1515

1616
### Write to files
1717

@@ -77,7 +77,7 @@ name if they're located in different storages. The options are:
7777
| `storage.auxiliary` | Files that the app can function without. Can be deleted by the system in low-storage situations.
7878
| `storage.temporary` | For temporary files and caches. Can be deleted by the system any time.
7979

80-
For full details, see the [API Reference](docs/reference.md)
80+
For full details, see the [API Reference](docs/reference.md).
8181

8282
## Questions?
8383

docs/reference.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ Asynchronously checks if the directory exists, and resolves the promise with a `
4747

4848
If no storage is specified, FileSystem.storage.backedUp is the default.
4949

50+
---
51+
static **absolutePath** (path: `string`, storage: `string?`): `string`
52+
53+
Returns the absolute path given a relative path and a storage class. Useful if you need to interact
54+
with native code that is unaware of the storage class system of this module.
55+
56+
If no storage is specified, FileSystem.storage.backedUp is the default.
57+
5058
## FileSystem.storage
5159

5260
There are four different storage classes available.
@@ -68,8 +76,8 @@ For files that are possible to re-generate / re-download, but are still importan
6876
around during low storage situations. F.ex. offline maps. The system will almost always keep these
6977
files around.
7078

71-
Corresponds to `<Application_Home>/Library/Caches` with "do not backup" flag on iOS, and a
72-
subdirectory of
79+
Corresponds to a subdirectory of `<Application_Home>/Library/Caches` with "do not backup" flags on
80+
iOS, and a subdirectory of
7381
[Context.getFilesDir()](https://developer.android.com/reference/android/content/Context.html#getFilesDir())
7482
excluded from backup on Android.
7583

@@ -81,7 +89,7 @@ This is for files that can be re-created, and that the app can live without. On
8189
delete these files in low storage situations. To play it safe, you should gracefully handle the
8290
case where they are gone, by checking for their existence.
8391

84-
Corresponds to `<Application_Home>/Library/Caches` on iOS, and a separate subdirectory of
92+
Corresponds to a subdirectory of `<Application_Home>/Library/Caches` on iOS, and a subdirectory of
8593
[Context.getFilesDir()](https://developer.android.com/reference/android/content/Context.html#getFilesDir())
8694
excluded from backup on Android.
8795

0 commit comments

Comments
 (0)