Resources
Library for accessing embedded resources.
- namespace Resources
function directoryExists(directoryPath)[link]
Checks to see if a directory exists. Note that directories only exist in resources if there are files contained in them. Directories present in the original source directory are not transferred to the final embedded resources.
Arguments
Name | Type | Description |
---|---|---|
directoryPath | string | path to a resource directory. |
Return Value
Type | Description |
---|---|
boolean | true if the directory exists. |
function directoryList(directoryPath, includeFullPath)[link]
Returns a list of file resources that are present in the given resource directory.
Arguments
Name | Type | Optional | Description |
---|---|---|---|
directoryPath | string | path to a resource directory. |
|
includeFullPath | boolean | Optional | if true, the full resource path will be included in the result. |
Return Value
Type | Description |
---|---|
List of strings | List of file resources available in that directory. |
function fileExists(resourcePath)[link]
Checks to see if a file path exists in embedded resources.
Arguments
Name | Type | Description |
---|---|---|
resourcePath | string | path to the resource from the root of the source directory. |
Return Value
Type | Description |
---|---|
boolean | True if the resource exists. |
function readText(resourcePath)[link]
Reads a text file from embedded resources.
Arguments
Name | Type | Description |
---|---|---|
resourcePath | string | path to the resource from the root of the source directory. |
Return Value
Type | Description |
---|---|
string | Text content of the file. |