sysopen
sysopen filehandle, filename, mode, [perms]
Opens the file given by
filename
and associates it with
filehandle
. This function calls
open(2)
with the parameters
filename
,
mode
, and
perms
.
The possible values and flag bits of the
mode
parameter are system-dependent;
they are available via the Fcntl library module. However, for
historical reasons, some values are universal: 0
means read-only, 1
means write-only, and 2
means read/write.
If the file named by filename
does not exist, and sysopen
creates it (typically because mode
includes the O_CREAT
flag),
then the value of perms
specifies the
permissions of the newly created file. If
perms
is omitted, the default value is
0666
, which allows read and
write for all. This default is reasonable. See umask .
The FileHandle module provides a more object-oriented
approach to sysopen
. See also
open .
3.149.242.175