VolumeFile

File name and size information. You can obtain a list of values of type VolumeFile using the LIST FILES command.

structure VolumeFile
Members
Suffix Type Description
NAME String Name of the file including extension
EXTENSION String File extension
SIZE scalar (bytes) Size of the file
READALL FileContent Reads file contents
WRITE(String|FileContent) boolean Writes the given string to the file
WRITELN(string) FileContent Writes the given string and a newline to the file
CLEAR None Clears this file
VolumeFile:NAME
Access:Get only
Type:String

name of the file, including its file extension.

VolumeFile:EXTENSION
Access:Get only
Type:String

File extension (part of the filename after the last dot).

VolumeFile:SIZE
Access:Get only
Type:scalar

size of the file, in bytes.

VolumeFile:READALL()
Returns:FileContent

Reads the content of the file.

VolumeFile:WRITE(String|FileContent)
Returns:boolean

Writes the given string or a FileContent to the file. Returns true if successful (lack of space on the Volume can cause a failure).

VolumeFile:WRITELN(string)
Returns:boolean

Writes the given string followed by a newline to the file. Returns true if successful.

VolumeFile:CLEAR()
Returns:None

Clears this file