comp • gb • file

File (gb)

This class is used for representing a file opened with the OPEN instruction, accessing standard input, output and error streams, and manipulating file paths with its static methods.

You cannot create this class directly. You must use the OPEN instruction.

This class inherits Stream.
This class is not creatable.

Static properties

Static methods
Returns the standard error output stream.
Err  
Returns the standard input stream.
In  
Returns the standard output stream.
Out  
Returns the name of a file without its extension.
BaseName  
Returns the directory component of a file path.
Dir  
Returns the extension of a file name.
Ext  
Return if a file path is hidden.
IsHidden  
Return True if Path is a relative path.
IsRelative  
Loads a file and returns its contents as a string.
Load  
Returns the name component of a file path.
Name  
Saves the contents of a string into a file.
Save  
Sets the base name of a path, and returns the modified path.
SetBaseName  
Sets the directory part of a path, and returns the modified path.
SetDir  
Sets the file extension of a path, and returns the modified path.
SetExt  
Sets the file name part of a path, and returns the modified path.
SetName  

Properties

Methods Events
Returns or sets if the stream is blocking.
Blocking  
Returns or sets the byte order used to read or write binary data to the stream.
ByteOrder  
This property signals whether the last use of LINE INPUT reached the end of file, instead of reading a full line with an end-of-line character.
EndOfFile  
Returns or sets the newline separator used by this stream.
EndOfLine  
Returns the system file descriptor associated with this Stream.
Handle  
Return if a stream is associated with a terminal.
IsTerm  
Returns a virtual object that allows you to enumerate a stream line by line.
Lines  
Returns or sets the tag associated with the stream.
Tag  
Return a virtual object that allows to manage the terminal associated with the stream.
Term  
Start to buffer data written to the stream, so that everything will be sent when the Send method is called.
Begin  
Closes the stream.
Close  
Drop the data that has been buffered since the last call to the Begin method.
Drop  
Read a line of text from the stream, like the LINE INPUT instruction.
ReadLine  
Send all the data, in one shot, since the last call to Begin.
Send  
Start or stop watching the stream file descriptor for reading or writing, after it has been opened.
Watch  
This event is raised when there is something to read from the file.
Read  
This special event is raised by the File.In stream when the control terminal of the process is resized.
Resize  
This event is raised when writing to the file is possible.
Write