Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 6cf7538

Browse files
committed
Document observable method
1 parent c112aaf commit 6cf7538

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/FileSystem.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,16 @@ export class FileSystem {
393393
}
394394
}
395395

396+
/**
397+
* Gets a observable which emits when a url is resolved to a local file path
398+
* A cache lock is required @see {lockCacheFile}
399+
*
400+
* @param url {String} - url of file to download.
401+
* @param componentId {String} - Unique id of the requestor.
402+
* @param permanent {Boolean} - True persists the file locally indefinitely, false caches the file temporarily (until file is removed during cache pruning).
403+
* @param fileName {String} - defaults to a sha1 hash of the url param with extension of same filetype.
404+
* @returns {Observable<CacheFileInfo>} observable that resolves to an object that contains the local path of the downloaded file and the filename.
405+
*/
396406
observable(
397407
url: string,
398408
componentId: string,

0 commit comments

Comments
 (0)