file.writeWholeFile
| Syntax |
file.writeWholeFile (f, contents, type, creator, date)
|
| Params |
f is the path to the file that you want to create. contents is what you want to be written to the file. type is an optional string4 that specifies the Mac OS file type. creator is an optional string4 that specifies the Mac OS file creator. date is an optional parameter specifying the creation date of the file.
|
| Action |
Creates a new file with the specified path, writes the specified contents to it, and closes the file.
|
| Returns |
True
|
| Examples |
file.writeWholeFile ("C:\\Program Files\\Frontier\\newfile.txt", "Lots of sample text.") true
|
| Notes |
This verb is implemented as a script. This verb takes care of creating, opening, and closing the file, so you don't have to do it. On Windows, the type and creator paramters are ignored. If the creation date isn't specified, it is set to clock.now (). 11/27/01: Added support for callback scripts that gain control after the file has been written. They live in user.callbacks.fileWriteWholeFile, take one parameter, the path to the file that was written. The returned value of the callback is ignored. Callbacks were also added for file.setModified.
|
| See Also |
file.writeTextFile
|