AbstractFile
Abstract class for handling files.
Set methods
Method name | comment |
---|---|
SetFilePath | Set the file path |
SetFileName | Set the file name |
SetFileExt | Set the file extension |
SetEOFStat | Set the end of file status |
SetOpenStat | Set the open status |
SetReadStat | Set the read status |
SetWriteStat | Set the write status |
Get Methods
Method name | comment |
---|---|
GetFilePath | Get the path of the file |
GetFileName | Get the name of the file |
GetFileExt | Get the extension of the file |
GetFileParts | Get the parts of the file |
EnquireMethods
Method name | comment |
---|---|
IsOpen | This function returns true if the file is open. |
IsEOF | This returns true if the end of file is reached. |
IsRead | This returns true if the file has read access. |
IsWrite | This 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.
📄️ Deallocate
Deallocate the file.
📄️ GetFileExt
Get the extension of the file.
📄️ GetFileName
Get the name of the file.
📄️ GetFileParts
Get the file name, path, and extension of the file.
📄️ GetFilePath
Get the path of the file.
📄️ IsEOF
Returns true if the end of file is reached.
📄️ IsOpen
Returns true if the file is open.
📄️ IsRead
Returns true if the file has read access.
📄️ IsWrite
Returns true if the file has write access.
📄️ SetEOFStat
Set the end of file status of the file.
📄️ SetFileExt
Set the extension of the file.
📄️ SetFileName
This method sets the name of the file.
📄️ SetFilePath
Set the path of the file.
📄️ SetOpenStat
Set the status of file being opened or not.
📄️ SetReadStat
Set the read access status of the file.
📄️ SetWriteStat
Set the write status of the file.