Delete a file. Directory targets are unsupported.
File path; must not end with /.
Missing file (404), directory target (400), or shared errors (see SessionStorage).
DELETE the path of a lock this client holds. The lock stays in place.
A lock this client holds.
A lock that has expired or was unlocked rejects with
RequestError and status 412; take a new one.
Otherwise as SessionStorage.delete.
Check existence with a HEAD request.
true on success; false for HTTP 404/410.
All other failures (see SessionStorage).
GET a streaming response for an absolute session path.
Reading the returned response body can still fail after this resolves.
A successful response with an unread body.
Missing resource (404/410) or other request/response errors. See SessionStorage for shared errors.
GET bytes from an absolute session path.
The complete response body.
Missing resource (404/410) or shared errors (see SessionStorage).
GET JSON from an absolute session path.
The parsed JSON value.
Missing resource (404/410), JSON parsing/conversion failures, or shared errors (see SessionStorage).
GET text from an absolute session path.
The complete response body decoded as text.
Missing resource (404/410) or shared errors (see SessionStorage).
List a directory (absolute session path).
Must end with /.
Optionalcursor: string | null
Optional last entry URL to start after.
Optionalreverse: boolean | null
Default false.
Optionallimit: number | null
Optional result limit.
Optionalshallow: boolean | null
Default false.
pubky://… entry URLs, or an empty array for an empty page.
Missing directory (404), invalid cursor (400), invalid response entries, or shared errors (see SessionStorage).
Take an exclusive write lock on a file at an absolute session path.
The file need not exist; locking a free path reserves it. timeoutSeconds is
the lifetime asked for; the homeserver caps it, and
StorageLock.timeoutSeconds tells what was granted. A write made under
the lock keeps it alive until the write ends, so it need not cover the upload itself.
File path; must not end with /.
The granted lock.
InvalidInput for a negative, NaN or out-of-range timeout;
a path that is already locked rejects with RequestError and status 423;
directory targets with 400; a homeserver without lock support with 405.
See SessionStorage for shared errors.
Create or replace a file with binary data at an absolute session path.
File path; must not end with /.
Upload or shared write/request errors (see SessionStorage).
PUT binary data to the path of a lock this client holds.
A lock this client holds.
A lock that has expired or was unlocked rejects with
RequestError and status 412; take a new one and read the file again. A file
that changed since the write was prepared rejects with status 409, which can
happen when an earlier change the storage backend ran late lands first; read it
again and retry. Otherwise as SessionStorage.putBytes.
Create or replace a file with JSON at an absolute session path.
File path (e.g. "/pub/app/data.json"); must not end with /.
JSON-serializable value.
InvalidInput if body cannot be converted to JSON;
otherwise serialization, upload, or shared write/request errors (see SessionStorage).
Create or replace a file with text at an absolute session path.
File path; must not end with /.
Upload or shared write/request errors (see SessionStorage).
PUT text to the path of a lock this client holds.
A lock this client holds.
A lock that has expired or was unlocked rejects with
RequestError and status 412; take a new one and read the file again. A file
that changed since the write was prepared rejects with status 409, which can
happen when an earlier change the storage backend ran late lands first; read it
again and retry. Otherwise as SessionStorage.putText.
Restart the lifetime of a lock this client holds.
On success the lock carries the newly granted StorageLock.timeoutSeconds.
A lock this client holds.
A lock that has expired or was unlocked rejects with
RequestError and status 412; take a new one and read the file again.
InvalidInput for a negative, NaN or out-of-range timeout.
See SessionStorage for shared errors.
Get metadata for an absolute, session-scoped path (e.g. "/pub/app/file.json").
On success, missing or unparseable metadata headers leave their properties absent.
Absolute path under your user (starts with /).
Metadata on success; undefined for HTTP 404/410.
All other failures (see SessionStorage).
Release a lock this client holds.
A lock this client holds.
A lock that no longer exists rejects with RequestError
and status 409. See SessionStorage for shared errors.
Read/write storage scoped to your session (absolute paths:
/pub/...or/priv/...).Failures reject with a PubkyError. Path validation, transport, and HTTP failures use
RequestError; only HTTP errors includedata.statusCode. URL parsing failures useInvalidInput. Credential preparation, refresh, and reading response bodies can also fail.Only SessionStorage.exists and SessionStorage.stats treat HTTP 404/410 as missing. Other HTTP failures, including 401/403 and 5xx, reject. Writes require write permission and can fail on directory targets (400), file/directory path conflicts (409), a path someone holds a StorageLock on (423), or exceeded quotas (507).