PostScript
4-40
file
filename
access
file
file
creates a file object with specified filename and access. The
access
values are:
r
open the file for reading only
w
create a file if one does not already exist, or truncate and overwrite it if
it does exist. File is opened for writing only.
a
create a file if one does not already exist or append it if it does exist.
File is opened for writing only.
r+
open the file for reading and writing. An undefinedfilename error
occurs if the file does not exist.
w+
create a file if it does not already exist, or truncate and overwrite if it
does exist. File is opened for reading and writing.
a+
create a file if it does not exist or append it if it does exist. File is
opened for reading and writing.
This operator is in systemdict.
Errors: invalidfileaccess, ioerror, limitcheck, stackunderflow, typecheck,
undefinedfilename
Note:
An undefinedfilename error occurs if the file does not exist.
filenameforall
pattern proc scratchstring
filenameforall
lists all the files with names that match a specified pattern string, copies the
filename for each of these files into a specified scratch string, and calls a
specified
proc
procedure. This operator is in systemdict.
Errors: ioerror, stackoverflow, stackunderflow, typecheck
fileposition
file
fileposition
position
indicates the current position on an open file. This operator is in systemdict.
Errors: ioerror, stackunderflow, typecheck, undefinedfilename
Note:
An undefinedfilename error occurs if the file does not exist.