Skip to content

Class: FileSessionStore ​

Persists the session as a JSON file on disk.

Implements ​

Constructors ​

Constructor ​

ts
new FileSessionStore(path): FileSessionStore;

Parameters ​

ParameterType
pathstring

Returns ​

FileSessionStore

Methods ​

load() ​

ts
load(): Promise<SessionData | null>;

The saved session, or null when the file does not exist yet.

Returns ​

Promise<SessionData | null>

Implementation of ​

SessionStore.load


save() ​

ts
save(data): Promise<void>;

Writes the session to the file.

Parameters ​

ParameterType
dataSessionData

Returns ​

Promise<void>

Implementation of ​

SessionStore.save

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.