Properties of \$Application
The $Application object can take the properties listed below. The object's properties can be accessed by using the . operator; see the Examples section below.
Properties
CopyFile(sSource, sTarget)
Copies the file at the location sSource to the location sTarget.
UnzipFile(sZipFile, sTargetDir)
Unzips the ZIP archive at the location sZipFile to the directory sTargetDir.
FileExists(sFile)
Checks whether the file at location sFile exists. Returns 1 or 0.
DeleteFile(sFile)
Deletes the file at the location sFile.
WriteDesignFileContent(sContentFile)
On code-generation, writes the content of the design file to the app-package using the file specified by sContentFile. (Deployed client files will also be written to the package.)
CopyAndResizeImage(sSource, sTarget, nTargetWidth, nTargetHeight)
Copies the image file at the location sSource to the location sTarget, and resizes the copied image to the pixel dimensions given by nTargetWidth and nTargetHeight.
Examples
Here are some SPL template usage examples:
sub CopyFile( byval $sSource, byval $sTarget )
return $Application.CopyFile( $sSource, $sTarget )
endsub
sub UnzipFile( byval $sZipFile, byval $sTargetDir )
return $Application.UnzipFile( $sZipFile, $sTargetDir )
endsub