Scripting Additions Guide
Table Of Contents
CHAPTER 2
Scripting Addition Commands
Command Definitions 59
PARAMETERS
referenceToFile
A reference of the form file nameString or alias nameString,
or a file reference number returned by a previous call to the
Open for Access command.
Class: Reference or integer
integer The number of bytes to which to set the offset of the end of
the file.
Class: Integer
RESULT
None
EXAMPLE
set eof file "Hard Disk:Status Reports:Weekly Report" to 10
NOTES
To specify the name (nameString) of a file, use a string of the form "Disk:Folder1:
Folder2:...:Filename" as described in Chapter 5, “Objects and References,”
of the AppleScript Language Guide. If you specify only the name of the file
(Filename) instead of its entire pathname, AppleScript attempts to find the file in
the current directory.
If you specify a reference to a file or an alias, the Set EOF command attempts to
match the reference with a file previously opened (with write permission) with
the Open for Access command. If the file was previously opened with read
permission only, Set EOF returns the error code –61. If a match is found, Set
EOF sets the end of the file as specified. If no match is found, Set EOF opens the
file, sets the end of the file, then closes the file.
If you specify a file reference number previously obtained (with write
permission) with the Open for Access command, Set EOF sets the end of
the file immediately.