Приглашаем посетить
Спорт (www.sport-data.ru)

Reference: sysopen

PreviousChapter 5
Function Reference
Next
 

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: zero means read-only, one means write-only, and two 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.


PreviousHomeNext
Reference: syscallBook IndexReference: sysread