Player APIs (BrightScript & Ja...
...
Object Reference
Content Management Objects
roAssetPoolFiles
5min
this object allows for interacting with files in an asset pool the javascript equivalent is assetpoolfiles docid\ nhocamfrj0avahj vearr object creation the roassetpoolfiles object is created with two parameters createobject("roassetpoolfiles", pool as roassetpool, assets as dynamic) the assets argument can be either an roassetcollection or rosyncspec object if multiple object instances requires use of an roassetcollection instance, it will be more efficient to convert rosyncspec to roassetcollection by calling getassets() once and then passing that collection to all object instances requiring it this object works similarly to the rosyncpoolfiles object ifassetpoolfiles getfailurereason() as string returns explanatory text if getpoolfilepath() returns an empty string or getpoolfileinfo() returns invalid movefileintopool(source filename as string, asset name as string) as boolean moves an arbitrary file into the appropriate location in the asset pool the source file must be in the same filesystem as the asset pool this method accepts two parameters source filename string string the path of an existing file in the filesystem asset name string string the name of an asset within the asset collection associated with the roassetpoolfiles instance if the asset size is known, it will be checked against the source file the move operation will fail if the asset name does not match any asset in the pool or if the file size does not match the known asset size this method returns true on success and false on failure use the getfailurereason() method to retrieve an error description getpoolfilepath(asset name as string) as string looks up the specified file name in the asset collection and uses the information to determine the actual name of the file in the pool this method returns an empty string if the name is not found in the asset collection, or if the file is not found in the pool getpoolfileinfo(asset name as string) as object looks up the specified file name in the asset collection and returns all available information, including the pool file path, as an associative array this method returns invalid if the asset name is not found in the asset collection if the file is not found in the pool, information from the asset collection will be returned without the pool path see the table below for a description of assets in the associative array field value description name string asset name link string asset url size string hash string hash in algorithm " " hash format change hint string only present if set auth user string only present if set auth password string only present if set auth inherit boolean headers inherit boolean probe string probe data path string absolute path of the file in the pool (or "invalid" if the file is not in the pool)