This commit is contained in:
Yonatan Bendahan
2025-04-15 15:13:34 +03:00
parent 9a5e29ae11
commit 8288bf7a67
+4
View File
@@ -13,6 +13,10 @@ export abstract class Source {
/** @internal */
_sizePromise: Promise<number> | null = null;
/**
* Returns promise that resolves with the size of the file.
* If the size is not known, it will be retrieved from the source.
*/
getSize() {
return this._sizePromise ??= this._retrieveSize();
}