Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

ON THIS PAGE

The assetrealizer object allows you to transfer files from an asset pool to other locations in the file directory.

assetrealizer IDL
[
    GarbageCollected
] interface AssetRealizer {
    AssetPoolFetcher(AssetPool pool, DOMString path);
    Promise<long> estimateRealizedSize(AssetList assets);
    Promise<FailureReason> realize(AssetList assets);
    Promise<DOMStringList> validateFiles(AssetList assets, DOMStringList options);
};

interface FailureReason {
    attribute DOMString name;
    attribute bool ok;
    attribute DOMString reason;
};

Object Creation

To create an assetrealizer object, you will first need to create an assetpool instance and download files to it using an assetfetcher instance. Then, load the brightsign/assetrealizer module using the Require() method, and create an instance of the assetrealizer class using the assetpool instance.

var AssetPoolClass = require("@brightsign/assetpool");
var assetPool = new AssetPoolClass("SD:/pool");
  
var AssetRealizerClass = require("@brightsign/assetrealizer");
var assetRealizer = new AssetRealizerClass(assetPool);
  • No labels