FS$Expand

FS ››
Parent Previous Next

FS$Expand

Alter FS file size


FS$Expand Alters the size of an open FS file.


Format:

FS$Expand context size


Returns:

Returns a condition code.


Argument:

context

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


size

The address of an 8-byte integer that contains the new size of the FS file, in bytes. This cannot be smaller than the current FS file size.


Description

Expands the size of a FS file opened with FS_Open. This cannot be used to reduce the size of the file. The actual amount of expansion will depend upon the FS File system's clustersize and the result may be larger than requested. If the FS file size cannot be changed, an error code indicating the problem will be returned. For instance, if the calling process lacks necessary privileges or quotas, or if there isn't enough room on the store for the additional FS file space requirements.


Condition Codes Returned:

Code

Meaning

FS_INVCONT

Specified context is not valid.

FS_BADSIZE

The specified size is not supplied or is smaller than the current FS file size.

FS_NOCHNG

The FS file size was not changed.

SS_NORMAL

Successful completion.


Other errors can be returned if the FS file resize has an error.