Aller au contenu principal

UrlResource

A Resource that represents a file available from a URL.

Hierarchy

Index

Constructors

constructor

  • Creates a new instance of UrlResource.


    Parameters

    • resource: UrlReference

      The URL reference.

    • optionalprogress: ProgressTracker

      The progress tracker.

    • optionaloptions: { corsProxy?: string }

    Returns UrlResource

Properties

publicoptional_progress

_progress?: ProgressTracker

Accessors

isAsync

  • get isAsync(): boolean
  • Whether this Resource is loaded asynchronously


    Returns boolean

name

  • get name(): string
  • The name of the referenced file


    Returns string

progress

  • get progress(): undefined | ProgressTracker
  • set progress(value: undefined | ProgressTracker): void
  • Returns undefined | ProgressTracker

  • Parameters

    • value: undefined | ProgressTracker

    Returns void

Methods

getURL

  • getURL(): string
  • @inheritDoc

    Returns string

resolve

  • resolve(): Promise<File>
  • @inheritDoc

    Returns Promise<File>

setPlayground

  • Parameters

    Returns void

staticcreate

  • create(ref: FileReference | DirectoryReference, options: { corsProxy?: string; progress?: ProgressTracker; semaphore?: default }): Resource<File | Directory>
  • 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 }

      Additional options for the Resource

    Returns Resource<File | Directory>

    A new Resource instance