UrlResource
Hierarchy
- FetchResource
- UrlResource
Index
Constructors
constructor
Creates a new instance of
UrlResource
.Parameters
resource: UrlReference
The URL reference.
optionalprogress: ProgressTracker
The progress tracker.
optionaloptions: { corsProxy?: string }
optionalcorsProxy: string
Returns UrlResource
Accessors
isAsync
Whether this Resource is loaded asynchronously
Returns boolean
name
The name of the referenced file
Returns string
progress
Returns ProgressTracker
Parameters
value: ProgressTracker
Returns void
Methods
getURL
Returns string
resolve
Returns Promise<File>
setPlayground
Parameters
playground: UniversalPHP
Returns void
staticcreate
Creates a new Resource based on the given file reference
Parameters
ref: FileReference | DirectoryReference
The file reference to create the Resource for
options: { corsProxy?: string; progress?: ProgressTracker; semaphore?: default; streamBundledFile?: StreamBundledFile }
Additional options for the Resource
optionalcorsProxy: string
optionalprogress: ProgressTracker
optionalsemaphore: default
Optional semaphore to limit concurrent downloads
optionalstreamBundledFile: StreamBundledFile
Returns Resource<File | Directory>
A new Resource instance
A
Resource
that represents a file available from a URL.