FolderResourceProvider class

Class which gives resource explorer access to resources which are stored in file system.

Extends

Constructors

FolderResourceProvider(ResourceExplorer, string, boolean, boolean)

Initializes a new instance of the FolderResourceProvider class.

Properties

changed

Event which is fired if any resource managed by the resource provider detects changes to the underlining resource.

directory

Folder to enumerate.

id

Gets the ID for this resource provider.

includeSubFolders

A value indicating whether to include subfolders.

resourceExplorer

Gets the resource explorer.

watcher

Gets attached file watcher.

Methods

getResource(string)

Gets resource by its id.

getResources(string)

Gets resources by extension.

refresh()

Refresh any cached content and look for new content.

Constructor Details

FolderResourceProvider(ResourceExplorer, string, boolean, boolean)

Initializes a new instance of the FolderResourceProvider class.

new FolderResourceProvider(resourceExplorer: ResourceExplorer, folder: string, includeSubFolders?: boolean, monitorChanges?: boolean)

Parameters

resourceExplorer
ResourceExplorer

Resource explorer.

folder

string

Root folder.

includeSubFolders

boolean

Whether include its sub folders.

monitorChanges

boolean

Whether monitor changes.

Property Details

changed

Event which is fired if any resource managed by the resource provider detects changes to the underlining resource.

any changed

Property Value

any

directory

Folder to enumerate.

directory: string

Property Value

string

id

Gets the ID for this resource provider.

string id

Property Value

string

The ID for this resource provider.

includeSubFolders

A value indicating whether to include subfolders.

includeSubFolders: boolean

Property Value

boolean

resourceExplorer

Gets the resource explorer.

ResourceExplorer resourceExplorer

Property Value

The resource explorer.

watcher

Gets attached file watcher.

FSWatcher watcher

Property Value

FSWatcher

The attached file watcher.

Method Details

getResource(string)

Gets resource by its id.

function getResource(id: string): Resource

Parameters

id

string

Resource id.

Returns

The resource by id.

getResources(string)

Gets resources by extension.

function getResources(extension: string): Resource[]

Parameters

extension

string

Resource extension.

Returns

Collection of resources.

refresh()

Refresh any cached content and look for new content.

function refresh()