FS$Create_File

FS ››
Parent Previous Next

FS$Create_File

Create a file in a FS file


FS$Create_File creates a file in an open FS file.


Format:

FS_Create_File context name info


Returns:

Returns a condition code.


Argument:

context

A pointer to the context value returned by FS_Open that indicates the FS file to affect.


name

The address of a SRB structure that points to the full file specification of the file to create. The name must be a complete valid path and cannot be null.


info

The address of a UOS_File_Info structure that contains information about the file to create. The structure has the following format:


Offset

Size in bytes

Description

0

8

Size of file, in bytes.

8

8

Logical end of file (byte offset)

16

8

reserved. Should be 0.

24

4

Clustersize, in bytes. Must be a power of 2.

28

4

reserved. Should be 0.

32

8

Creation date/timestamp.

40

8

Last modified date/timestamp.

48

4

Creator ID.

52

4

Owner ID.

56

8

Flags. The FAF_* constants can be used for this, but several of them have no meaning in this context.

64

4

Version limit.

68

8

reserved. Should be 0.

76

8

reserved. Should be 0.

84

8

reserved. Should be 0.

92

8

reserved. Should be 0.


The Creator ID, Owner ID, and Version limit are user-defined.


Description

Creates a file in a FS file opened with FS_Open.


Condition Codes Returned:

Code

Meaning

FS_INVCONT

Specified context is not valid.

FS_INVNAME

Specified name is not valid.

SS_NORMAL

Successful completion.