Files and Freeway Actions
Last edit by:
Walter Davis
8 Apr, 2009
Pages in this section:
- A Hello World tutorial
- Action Elements
- Class FWAction
- Class FWActionList
- Class FWAttribute
- Class FWColor
- Class FWLinkParameter
- Class FWListData
- Class FWOSAInterpreter
- Class FWOutput
- Class FWPage
- Class FWParameter
- Class FWParameterList
- Class FWTag
- Files and Freeway Actions
- General Properties and User Methods
- Organisation of Classes
- Specific Properties and User Methods
- Weaver
It is possible for Freeway Actions to read and write files and to cause those files to be uploaded when the site is published. So for example you could make a suite of Freeway Actions that generate JavaScript files, text files or even HTML files that are uploaded automatically. Access to the files is largely through the FWFile class.
However there are a small number of global methods that augment the FWFile class. These methods all apply to the “working folder” of the Freeway document. The working folder is next to your Freeway Document and will contain files that are generated by Actions
fwDeleteFile(name)
This attempts to delete a file with the specified name from the working folder. If the file of that name was not deleted it returns false otherwise it returns true. Boolean.
fwFindAllFiles([type[, creator]])
This returns an array with the names of all the files in the working folder. If a [Macintosh] file type is passed then Freeway will return just those files of that type. If a Macintosh creator type is also passed then Freeway will return just the files of that creator and type. The type and creator are expected to be strings of 4 characters. If there are no files that match that type or indeed there is no working folder then an array with no elements will be returned.
Arguments:
type4 charstring creatorString
fwFindFile(name)
This is returned if a file of a given name exists.
Argument:
name: string name of file to look for.
