On output, conversion code "%F" writes the filename.
| Name | Description |
|---|---|
| AjSFile | |
| AjOFile |
| Name | Description |
|---|---|
| ajFileNew | Default constructor for an input file |
| ajFileNewF | Constructor using an existing open file, for example stdin or stdout |
| ajFileNewIn | Constructor using a filename for an input file |
| ajFileNewApp | Default constructor using a filename for an output file to be opened for appending records to the end of the file |
| ajFileNewOut | Default constructor using a filename for an output file |
| ajFileNewInPipe | Constructor using output from a forked command |
| ajFileNewInList | Constructor using an AjPList of filenames |
| Name | Description |
|---|---|
| ajFileClose | Default destructor |
| Name | Description |
|---|---|
| ajFileGets | Reads a record from a file |
| ajFileGetsTrim | Reads a record from a file and removes newline characters |
| Name | Description |
|---|---|
| ajFileName | Returns the filename as char |
| ajFileNameS | Returns the filename as an AjPStr |
| ajFileFp | Returns the equivalent C file pointer |
| ajFileGetApp | Returns the App element. |
| Name | Description |
|---|---|
| AjPFileBuff | Buffered input file. |
| Name | Type | Description |
|---|---|---|
| fp | C file pointer | |
| Handle | AJAX file number 0 if unused | |
| Name | File name as used when opening | |
| List | List of file names (first is open) | |
| End | True if EOF has been reached | |
| App | True if file was opened for append. | |
| Buff | Buffer for latest line read | |
| Pid | Process PID if any |
This is a substructure of the AjPFileBuff object.
| Name | Type | Description |
|---|---|---|
| Line | String : this line | |
| Next | Next line in the list, NULL for last | |
| Fpos | File offset for start of this line |
| Name | Description |
|---|---|
| AjSFileBuff | |
| AjOFileBuff |
| Name | Description |
|---|---|
| ajFileBuffNew | Default constructor for an input file |
| ajFileBuffNewF | Constructor using an existing open file, for example stdin or stdout. |
| ajFileBuffNewIn | Constructor using a filename |
| ajFileBuffNewS | Constructor using a line of buffered data |
| ajFileBuffNewDW | Constructor using a directory and wildcard filename |
| ajFileBuffNewInList | Constructor using a list of filenames |
| Name | Description |
|---|---|
| ajFileBuffDel | Default destructor |
| Name | Description |
|---|---|
| ajFileBuffNobuff | Turns off input buffering. |
| ajFileBuffReset | Resets so the next read uses the first buffered line |
| ajFileBuffClear | Deletes unwanted old lines from the buffer but can keep the most recent line(s) for reuse. |
| ajFileBuffStripHtml | Processes data in the file buffer, removing HTML tokens |
| Name | Description |
|---|---|
| ajFileBuffLoad | Reads all input lines from a file into the buffer. |
| Name | Description |
|---|---|
| ajFileBuffGet | Reads a line from a buffered file. |
| ajFileBuffGetStore | Reads a line from a buffered file with append. |
| ajFileBuffGetStoreL | Reads a line from a buffered file with append. |
| Name | Description |
|---|---|
| ajFileBuffEmpty | Tests whether a file buffer is empty. |
| ajFileBuffTrace | Writes debug messages to indicate the contents of a buffered file. |
| Name | Description |
|---|---|
| ajFileBuffFile | Returns the equivalent AjPFile without the buffer access. |
| Name | Description |
|---|---|
| ajFileBuffTraceFull | Writes debug messages to show the full contents of a buffered file. |
| Name | Description |
|---|---|
| ajFileBuffIsBuffered | Tests for input buffering. |
| Name | Description |
|---|---|
| AjPFile | Simple input file. |
| Name | Type | Description |
|---|---|---|
| File | The input file - data to be buffered | |
| Lines | All lines ... where the data really is | |
| Freelines | Free list of lines for reuse | |
| Curr | Current line in Lines list | |
| Prev | Previous line (points to Curr for delete) | |
| Last | Last line for quick appending | |
| Freelast | Last free line for quick append | |
| Nobuff | if true, do not buffer the file | |
| Pos | Position in list | |
| Size | Size of list | |
| FreeSize | Size of free list | |
| Fpos | File position in File |
| Name | Description |
|---|---|
| AjSDir | |
| AjODir |
| Name | Description |
|---|---|
| ajDirNew | Default constructor for a directory |
| ajDirNewS | Directory constructor with extension |
| ajDirNewSS | Directory constructor with prefix and extension |
| ajDiroutNew | Default constructor for an output directory |
| ajDiroutNewS | Output directory constructor with extension |
| ajDiroutNewSS | Output directory constructor with prefix and extension |
| Name | Description |
|---|---|
| ajDirDel | Default destructor |
| ajDiroutDel | Default destructor for output directory |
| Name | Type | Description |
|---|---|---|
| Name | Path | |
| Prefix | Default filename prefix | |
| Extension | Default file extension | |
| Output | True if to be used for output |
On output, conversion code "%F" writes the filename.
| Name | Description |
|---|---|
| AjSOutfile | |
| AjOOutfile |
| Name | Description |
|---|---|
| ajOutfileNew | Default constructor for an output file |
| Name | Description |
|---|---|
| ajOutfileClose | Close file and descruct |
| ajOutfileDel | Default destructor |
| Name | Type | Description |
|---|---|---|
| File | File object | |
| Type | Named data file type | |
| Itype | Index number for Type | |
| Formatstr | Format specific for this data type | |
| Format | Index for Formatstr for this data type |