Skip to main content

AbstractFile

Abstract class for handling files.

Set methods

Method namecomment
SetFilePathSet the file path
SetFileNameSet the file name
SetFileExtSet the file extension
SetEOFStatSet the end of file status
SetOpenStatSet the open status
SetReadStatSet the read status
SetWriteStatSet the write status

Get Methods

Method namecomment
GetFilePathGet the path of the file
GetFileNameGet the name of the file
GetFileExtGet the extension of the file
GetFilePartsGet the parts of the file

EnquireMethods

Method namecomment
IsOpenThis function returns true if the file is open.
IsEOFThis returns true if the end of file is reached.
IsReadThis returns true if the file has read access.
IsWriteThis returns true if the file has write access.

Deferred methods

The following methods should be implemented by the subclasses.

Open

This methid is used for opening the file. First we initiate an instance and then open it for reading and/or writing.

Close

This method is used for closing the file.

Delete

This method is used for deleting the file.

All methods

📄️ AbstractFile

This type is an abstract type, so it has no specific implementation. It exists only to provide a base for the extended types. It specifies the maximum lengths for the file path, name, and extension, some basic attributes of a file such as whether or not it is open and also if it is open for reading or writing are provided. Methods to interface to all attributes are also provided. Since this is an abstract type, it has no specific implementation so see one of it's extended types for examples on how it should be used.