feat: add session.storagePath to get path on disk for session data (#28665)

This commit is contained in:
Samuel Attard 2021-04-27 09:54:28 -07:00 committed by GitHub
parent b97b973306
commit fa61e3b119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 1 deletions

View file

@ -817,6 +817,11 @@ Returns `Extension[]` - A list of all loaded extensions.
**Note:** This API cannot be called before the `ready` event of the `app` module
is emitted.
#### `ses.getStoragePath()`
A `String | null` indicating the absolute file system path where data for this
session is persisted on disk. For in memory sessions this returns `null`.
### Instance Properties
The following properties are available on instances of `Session`:
@ -830,6 +835,11 @@ code to the `setSpellCheckerLanguages` API that isn't in this array will result
A `Boolean` indicating whether builtin spell checker is enabled.
#### `ses.storagePath` _Readonly_
A `String | null` indicating the absolute file system path where data for this
session is persisted on disk. For in memory sessions this returns `null`.
#### `ses.cookies` _Readonly_
A [`Cookies`](cookies.md) object for this session.