Class actuate.reportexplorer.File
Description
actuate.reportexplorer.File is a reference object for displaying and controlling a file reference.
Constructor
Syntax
Function summary
Table 4-35 lists actuate.reportexplorer.File functions.
Table 4-35 actuate.reportexplorer.File functions getId( ) getName( ) getSize( ) setId( ) setName( ) setSize( )actuate.reportexplorer.File.getAccessType
Syntax
Returns
String. Either "private" or "shared" according to whether the file has been shared or not.
Example
To stop a script from running if a File is private, use code similar to the following:
if(file.getAccessType( ) == "private"){ return;}actuate.reportexplorer.File.getDescription
Syntax
Gets the description from the file.
Returns
Example
To stop a script from running if a file does not have a description, use code similar to the following:
if(file.getDescription( ) == (null || "")){ return;}actuate.reportexplorer.File.getFileType
Syntax
Gets the file extension value for this File.
Returns
Example
To store the file extension of the File object file in a variable called type, use code similar to the following:
actuate.reportexplorer.File.getId
Syntax
Returns
Example
To store the file id of the File object file in a variable called id, use code similar to the following:
actuate.reportexplorer.File.getName
Syntax
Returns
Example
To store the name of the File object file in a variable called name, use code similar to the following:
actuate.reportexplorer.File.getOwner
Syntax
Returns
Example
To store the name of the owner of the File object file in a variable called owner, use code similar to the following:
actuate.reportexplorer.File.getPageCount
Syntax
Gets the number pages in the file, if applicable.
Returns
Example
To halt a script if the number of pages exceeds 100 in the file referenced by the File object largefile, use code similar to the following:
if (largefile.getPageCount( ) > 100) {return;}actuate.reportexplorer.File.getSize
Syntax
Gets the size value for this file.
Returns
Example
To store a file object size in a variable called size, use code similar to the following:
actuate.reportexplorer.File.getTimeStamp
Syntax
Returns
Example
To store the time stamp for the file referenced by the File object oldfile in a variable called timestamp, use code similar to the following:
actuate.reportexplorer.File.getUserPermissions
Syntax
Returns
Example
To store a file’s permissions in the permissions variable, use code similar to the following:
actuate.reportexplorer.File.getVersion
Syntax
Returns
Example
To store the file version in the version variable, use code similar to the following:
actuate.reportexplorer.File.getVersionName
Syntax
Returns
Example
To store a version name in the version variable, use code similar to the following:
actuate.reportexplorer.File.setAccessType
Syntax
Parameters
String. "private" or "shared" indicating whether the file has been shared or not.
Example
To make a file private, use code similar to the following:
actuate.reportexplorer.File.setDescription
Syntax
Sets the description from the file.
Parameters
Example
To clear a file’s description, use code similar to the following:
actuate.reportexplorer.File.setFileType
Syntax
Sets the file Type value for this File.
Parameters
Example
To assign a file’s type if none is assigned, use code similar to the following:
actuate.reportexplorer.File.setId
Syntax
Parameters
Example
To set a file’s id to 42, use code similar to the following:
actuate.reportexplorer.File.setName
Syntax
Parameters
Example
To set a file’s name to releasedates, use code similar to the following:
actuate.reportexplorer.File.setOwner
Syntax
Parameters
Example
To set a file’s owner to Administrator, use code similar to the following:
actuate.reportexplorer.File.setPageCount
Syntax
Sets the number pages in the file, if applicable.
Parameters
Example
To set a file object’s page to 100 if available, use code similar to the following:
if(file.getPageCount( ) > 100) {file.setPageCount(100)};actuate.reportexplorer.File.setSize
Syntax
Parameters
Example
To reset a file’s size to zero, use code similar to the following:
actuate.reportexplorer.File.setTimeStamp
Syntax
Parameters
Example
To set a file’s timestamp to the current time, use code similar to the following:
actuate.reportexplorer.File.setUserPermissions
Syntax
Parameters
Example
To apply the user permissions for file1 to file2, use code similar to the following:
actuate.reportexplorer.File.setVersion
Syntax
Parameters
Example
To set the file’s version to 1 for the first version, use code similar to the following:
actuate.reportexplorer.File.setVersionName
Syntax
Parameters
Example
To reset a file’s version name to 2004, use code similar to the following:
(c) Copyright Actuate Corporation 2011 |
![]() |