Skip to content

@ui5/fs/ReaderCollectionPrioritized

@ui5/fs/ReaderCollectionPrioritized

Prioritized Resource Locator Collection

Constructor

new @ui5/fs/ReaderCollectionPrioritized(parameters)

Description: The constructor.

Source: fs/lib/ReaderCollectionPrioritized.js, line 11

Parameters:
NameTypeDescription
parametersobject
Properties:
NameTypeAttributesDescription
namestringThe collection name
readersArray<@ui5/fs/AbstractReader>optionalPrioritized list of resource readers (tried in the order provided).
If none are provided, the collection will never return any results.

Extends

Methods

byGlob(virPattern, optionsopt) → {Promise<Array<@ui5/fs/Resource>>}

Description: Locates resources by matching glob patterns.

js
byGlob("**‏/*.{html,htm}");
byGlob("**‏/.library");
byGlob("/pony/*");

Source: fs/lib/AbstractReader.js, line 51

Overrides: @ui5/fs/AbstractReader#byGlob

Parameters:
NameTypeAttributesDescription
virPatternstring | Array<string>glob pattern as string or array of glob patterns for
virtual directory structure
optionsobjectoptionalglob options
Properties:
NameTypeAttributesDefaultDescription
nodirbooleanoptionaltrueDo not match directories
Returns:

Promise resolving to list of resources

Type: Promise<Array<@ui5/fs/Resource>>

byPath(virPath, optionsopt) → {Promise<@ui5/fs/Resource>}

Description: Locates resources by matching a given path.

Source: fs/lib/AbstractReader.js, line 78

Overrides: @ui5/fs/AbstractReader#byPath

Parameters:
NameTypeAttributesDescription
virPathstringVirtual path
optionsobjectoptionalOptions
Properties:
NameTypeAttributesDefaultDescription
nodirbooleanoptionaltrueDo not match directories
Returns:

Promise resolving to a single resource

Type: Promise<@ui5/fs/Resource>