Specifications

A file matches if its filename extension and/or its Mac file type
(after conversion) match the specified filename extension. A folder
matches if any of the files at the topmost level inside the folder
match the specified type. These semantics are similar to those of
matching cross-platform file types in filter connections.
Returns true if the job is a single file, false otherwise.
isFile( ) : Boolean
Returns true if the job is a folder, false otherwise.
isFolder( ) : Boolean
Returns the number of files in the job. If it is a single file, the
function returns 1. If it is a job folder, the function returns the
getFileCount( ) : Number
number of files in the job folder and any subfolders, recursively
(folders and subfolders themselves do not contribute to the
count).
Returns the size in bytes of the job. If it is a job folder, all files
in subfolders are included in the count, recursively.
getByteCount( ) : Number
Getting temporary output paths
Returns an absolute path to a writable temporary location in the file
system with the specified filename (which should include the
filename extension if one is required).
createPathWithName(
name : String,
createFolder : Boolean )
: String
If the optional createFolder argument is true, the function creates a
new folder at the location indicated by the returned path. The caller
can use this folder as the root of an output job folder or just as a
location to store temporary files, one of which may become an output
file.
If the optional createFolder argument is false or missing, the function
does not create a file or folder at the location indicated by the
returned path (but the parent folder is guaranteed to exist). The caller
can use the path to create an output file or a temporary file.
The returned path is guaranteed to differ between invocations of the
function, even for the same job and with identical argument values.
Also, after the entry point returns, Switch deletes any file or folder
left at any of the paths created using this function.
Same as above but uses the filename of the job after substituting
the specified extension (rather than replacing the complete filename).
createPathWithExtension(
ext : String, createFolder
: Boolean ) : String
If the specified extension is the empty string, any trailing dot is
removed from the filename; this helps creating a folder path without
extension.
Sending jobs to outgoing connections
The semantics for sending files to outgoing connections depend on the connection type. However
all outgoing connections of a flow element (and thus a script) have the same type, and this type
is defined in the script declaration.
465
Enfocus Switch 10