docServerUserLandCom picture
Contents
Frontier Site

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 ().

See Also file.readWholeFile


© Copyright 1992-2026 UserLand Software. Email: webmaster@userland.com.