BBjResourceUrl::setSourceFileName

Description

In BBj 12.0 and higher, this method sets the file from which the contents of this URL were obtained. This method will re-read the file given here and cause BBjResourceUrl::getAppUrl to return a new value if the file contents differ.

Syntax

Return Value

Method

void

setSourceFileName(string sourceFile)

Parameters

Variable

Description

sourceFile

The file to read and update the contents given by this link.

Return Values

None.

Remarks

None.

Example

rem ' BBjResourceUrl::setSourceFileName

admin! = bbjapi().getAdmin("admin","admin123")
appServer! = admin!.getWebAppServer()
vector! = appServer!.getStaticResources()
if (vector!.size()) then
    for i = 0 to vector!.size() - 1
        resource! = vector!.get(i)

        rem ' Update the resource if the image file has changed.
        filename$ = resource!.getSourceFileName()
        resource!.setSourceFileName(filename$)
        print ""
        print resource!.getMimeType()
        print resource!.getSourceFileName()
        print resource!.getAppUrl()
    next i
endif

See Also

BBjAPI

BBjAppConfig

BBjAppServer

BBjResourceUrl

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.