This message is sent to create a new data file or truncate an existing data file to length zero, and open the file. The handle returned can be used in subsequent read, write, lock, unlock and close messages.
Client Request ================================== |
Description ================================= |
UCHAR WordCount; | Count of parameter words = 3 |
USHORT FileAttributes; | New file attributes |
UTIME CreationTime; | Time file was created |
USHORT ByteCount; | Count of data bytes; min = 2 |
UCHAR BufferFormat; | 0x04 |
STRING FileName[]; | File name |
FileName is the fully qualified name of the file relative to Tid.
FileAttributes are encoded as described in "File Attribute Encoding", section 3.10.
Server support of the CreationTime field is optional. Encoding of these fields is discussed in the "Time And Date Encoding" section.
Server Response ================================== |
Description ================================= |
UCHAR WordCount; | Count of parameter words = 1 |
USHORT Fid; | File handle |
USHORT ByteCount; | Count of data bytes = 0 |
Clients must have write permission on the file's parent directory in order to create a new file, or write permission on the file itself in order to truncate it. The access permissions granted on a created file will be read/write permission for the creator. Access permissions for truncated files are not modified. The newly created or truncated file is opened in read/write/compatibility mode.