Provides cross-platform text file reading interface.
More...
#include <pge_file_lib_globs.h>
Provides cross-platform text file reading interface.
Relative positions of carriage.
| Enumerator |
|---|
| current |
Relative to current position.
|
| begin |
Relative to begin of file.
|
| end |
Relative to end of file.
|
| PGE_FileFormats_misc::TextFileInput::TextFileInput |
( |
PGESTRING |
filePath, |
|
|
bool |
utf8 = false |
|
) |
| |
Constructor with pre-opening of the file.
- Parameters
-
| filePath | Full or relative path to the file |
| utf8 | Use UTF-8 encoding or will be used local 8-bin encoding |
| bool PGE_FileFormats_misc::TextFileInput::eof |
( |
| ) |
|
Is carriage position at end of file.
- Returns
- true if carriage position at end of file
| bool PGE_FileFormats_misc::TextFileInput::exists |
( |
PGESTRING |
filePath | ) |
|
|
static |
Checks is requested file exist.
- Parameters
-
| filePath | Full or relative path to the file |
- Returns
- true if file exists
| bool PGE_FileFormats_misc::TextFileInput::open |
( |
PGESTRING |
filePath, |
|
|
bool |
utf8 = false |
|
) |
| |
Opening of the file.
- Parameters
-
| filePath | Full or relative path to the file |
| utf8 | Use UTF-8 encoding or will be used local 8-bin encoding |
| PGESTRING PGE_FileFormats_misc::TextFileInput::read |
( |
long |
len | ) |
|
Reads requested number of characters from a file.
- Parameters
-
| Maximal | lenght of characters to read from file |
- Returns
- string contains requested line of characters
| PGESTRING PGE_FileFormats_misc::TextFileInput::readAll |
( |
| ) |
|
Reads all data from a file at current position of carriage.
- Returns
| PGESTRING PGE_FileFormats_misc::TextFileInput::readLine |
( |
| ) |
|
Reads whole line before line feed character.
- Returns
- string contains gotten line
Changes position of carriage to specific file position.
- Parameters
-
| pos | Target position of carriage |
| relativeTo | defines relativity of target position of carriage (current position, begin of file or end of file) |
| long long PGE_FileFormats_misc::TextFileInput::tell |
( |
| ) |
|
Returns current position of carriage relative to begin of file.
- Returns
- current position of carriage relative to begin of file
The documentation for this class was generated from the following files:
- /home/vitaly/_git_repos/PGE-Project/_common/PGE_File_Formats/pge_file_lib_globs.h
- /home/vitaly/_git_repos/PGE-Project/_common/PGE_File_Formats/pge_file_lib_globs.cpp