Small adjustments to getSize change

This commit is contained in:
David Payr
2025-04-15 15:11:11 +02:00
parent 2f0e686a0f
commit 1e3a618c26
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ export abstract class Source {
_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.
* Resolves with the total size of the file in bytes. This function is memoized, meaning only the first call
* will retrieve the size.
*/
getSize() {
return this._sizePromise ??= this._retrieveSize();