Datatypes:
AjPFile | File object |
AjPFilebuff | Buffered file object |
Sections:
file line read operations | Input |
file binary read operations | Input |
Functions:
ajReadline | Read a line from a file. |
ajReadlineAppend | Reads a record from a file and appends it to the user supplied buffer. |
ajReadlinePos | Reads a line from a file. |
ajReadlineTrim | Reads a line from a file and removes any trailing newline. |
ajReadlineTrimPos | Reads a line from a file and removes any trailing newline. |
AjBool ajReadline ( AjPFile file, AjPStr* Pdest );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
AjPStr* | Pdest | Output | Buffer to hold the current line. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.0.0
AjBool ajReadlineAppend ( AjPFile file, AjPStr* Pdest );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
AjPStr* | Pdest | Modify | Buffer to hold results. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.0.0
AjBool ajReadlinePos ( AjPFile file, AjPStr* Pdest, ajlong* Ppos );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
AjPStr* | Pdest | Output | Buffer to hold the current line. |
ajlong* | Ppos | Output | File position before the read. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.0.0
AjBool ajReadlineTrim ( AjPFile file, AjPStr* Pdest );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
AjPStr* | Pdest | Output | Buffer to hold the current line. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.0.0
AjBool ajReadlineTrimPos ( AjPFile file, AjPStr* Pdest, ajlong* Ppos );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
AjPStr* | Pdest | Output | Buffer to hold the current line. |
ajlong* | Ppos | Output | File position before the read. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.0.0
Functions:
ajReadbinBinary | Binary read from an input file object using the C 'fread' function. |
ajReadbinChar | Reads a character string from a file |
ajReadbinCharTrim | Reads a character string from a file and trims trailing spaces |
ajReadbinInt | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from little-endian. |
ajReadbinIntEndian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinIntLocal | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinInt2 | Binary read of a 2 byte integer from an input file object using the C 'fread' function. Converts from little-endian. |
ajReadbinInt2Endian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinInt2Local | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinInt4 | Binary read of a 4 byte integer from an input file object using the C 'fread' function. |
ajReadbinInt4Endian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinInt4Local | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinInt8 | Binary read of an 8 byte integer from an input file object using the C 'fread' function. Converts from little-endian. |
ajReadbinInt8Endian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinInt8Local | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinStr | Reads a string from a file |
ajReadbinStrTrim | Reads a character string from a file and trims trailing spaces |
ajReadbinUint | Binary read of an unsigned integer from an input file object using the C 'fread' function. |
ajReadbinUintEndian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinUintLocal | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinUint2 | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from little-endian. |
ajReadbinUint2Endian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinUint2Local | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinUint4 | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from little-endian. |
ajReadbinUint4Endian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from a big-endian. |
ajReadbinUint4Local | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
ajReadbinUint8 | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from little-endian. |
ajReadbinUint8Endian | Binary read of an unsigned integer from an input file object using the C 'fread' function. Converts from big-endian. |
ajReadbinUint8Local | Binary read of an unsigned integer from an input file object using the C 'fread' function. No conversion (assumes integer was written on the same system). |
size_t ajReadbinBinary ( AjPFile file, size_t count, size_t size, void* buffer );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
size_t | count | Input | Number of elements to read. |
size_t | size | Input | Number of bytes per element. |
void* | buffer | Output | Buffer for output. |
size_t | RETURN | Return value from 'fread' |
From EMBOSS 6.0.0
size_t ajReadbinChar ( AjPFile file, size_t size, char* buffer );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | File object. |
size_t | size | Input | Number of bytes to read from index file. |
char* | buffer | Output | Buffer to read into |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinCharTrim ( AjPFile file, size_t size, char* buffer );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | File object. |
size_t | size | Input | Number of bytes to read from index file. |
char* | buffer | Output | Buffer to read into |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt ( AjPFile file, ajint* Pi );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajint* | Pi | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinIntEndian ( AjPFile file, ajint* Pi );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajint* | Pi | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinIntLocal ( AjPFile file, ajint* Pi );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajint* | Pi | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt2 ( AjPFile file, ajshort* Pi2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajshort* | Pi2 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt2Endian ( AjPFile file, ajshort* Pi2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajshort* | Pi2 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt2Local ( AjPFile file, ajshort* Pi2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajshort* | Pi2 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt4 ( AjPFile file, ajint* Pi4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajint* | Pi4 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt4Endian ( AjPFile file, ajint* Pi4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajint* | Pi4 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt4Local ( AjPFile file, ajint* Pi4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajint* | Pi4 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt8 ( AjPFile file, ajlong* Pi8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajlong* | Pi8 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt8Endian ( AjPFile file, ajlong* Pi8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajlong* | Pi8 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinInt8Local ( AjPFile file, ajlong* Pi8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajlong* | Pi8 | Output | Integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinStr ( AjPFile file, size_t size, AjPStr* Pstr );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | File object. |
size_t | size | Input | Number of bytes to read from index file. |
AjPStr* | Pstr | Output | Buffer to read into |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.5.0
size_t ajReadbinStrTrim ( AjPFile file, size_t size, AjPStr* Pstr );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | File object. |
size_t | size | Input | Number of bytes to read from index file. |
AjPStr* | Pstr | Output | Buffer to read into |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.5.0
size_t ajReadbinUint ( AjPFile file, ajuint* Pu );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajuint* | Pu | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUintEndian ( AjPFile file, ajuint* Pu );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajuint* | Pu | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUintLocal ( AjPFile file, ajuint* Pu );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajuint* | Pu | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint2 ( AjPFile file, ajushort* Pu2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajushort* | Pu2 | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint2Endian ( AjPFile file, ajushort* Pu2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajushort* | Pu2 | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint2Local ( AjPFile file, ajushort* Pu2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajushort* | Pu2 | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint4 ( AjPFile file, ajuint* Pu4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajuint* | Pu4 | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint4Endian ( AjPFile file, ajuint* Pu4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajuint* | Pu4 | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint4Local ( AjPFile file, ajuint* Pu4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajuint* | Pu4 | Output | Unsigned integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint8 ( AjPFile file, ajulong* Pu8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajulong* | Pu8 | Output | Unsigned long integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint8Endian ( AjPFile file, ajulong* Pu8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajulong* | Pu8 | Output | Unsigned long integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
size_t ajReadbinUint8Local ( AjPFile file, ajulong* Pu8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Input file. |
ajulong* | Pu8 | Output | Unsigned long integer value |
size_t | RETURN | Number of bytes read. |
From EMBOSS 6.0.0
Functions:
ajWritebinBinary | Binary write to an output file object using the C 'fwrite' function. |
ajWritebinByte | Writes a single byte to a binary file |
ajWritebinChar | Writes a text string to a binary file |
ajWritebinInt2 | Writes a 2 byte integer to a binary file, with the correct byte orientation |
ajWritebinInt4 | Writes a 4 byte integer to a binary file, with the correct byte orientation |
ajWritebinInt8 | Writes an 8 byte long to a binary file, with the correct byte orientation |
ajWritebinNewline | Writes newline character(s) to a file |
ajWritebinStr | Writes a string to a binary file |
ajWritebinUint2 | Writes a 2 byte unsigned integer to a binary file, with the correct byte orientation |
ajWritebinUint4 | Writes a 4 byte unsigned integer to a binary file, with the correct byte orientation |
ajWritebinUint8 | Writes an 8 byte unsigned long to a binary file, with the correct byte orientation |
size_t ajWritebinBinary ( AjPFile file, size_t count, size_t size, const void* buffer );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file. |
size_t | count | Input | Number of elements to write. |
size_t | size | Input | Number of bytes per element. |
const void* | buffer | Input | Buffer for output. |
size_t | RETURN | Return value from 'fwrite' |
From EMBOSS 6.0.0
size_t ajWritebinByte ( AjPFile file, char ch );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
char | ch | Input | Character |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinChar ( AjPFile file, const char* txt, size_t len );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
const char* | txt | Input | Text string |
size_t | len | Input | Length (padded) to write to the file |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinInt2 ( AjPFile file, ajshort i2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
ajshort | i2 | Input | Integer |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinInt4 ( AjPFile file, ajint i4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
ajint | i4 | Input | Integer |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinInt8 ( AjPFile file, ajlong i8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
ajlong | i8 | Input | Integer |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinNewline ( AjPFile file );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.2.0
size_t ajWritebinStr ( AjPFile file, const AjPStr str, size_t len );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
const AjPStr | str | Input | String |
size_t | len | Input | Length (padded) to use in the file |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinUint2 ( AjPFile file, ajushort u2 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
ajushort | u2 | Input | Unsigned integer |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.0.0
size_t ajWritebinUint4 ( AjPFile file, ajuint u4 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
ajuint | u4 | Input | Unsigned integer |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.5.0
size_t ajWritebinUint8 ( AjPFile file, ajulong u8 );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
ajulong | u8 | Input | Unsigned integer |
size_t | RETURN | Return value from fwrite |
From EMBOSS 6.5.0
Functions:
ajWriteline | Writes a string to a file, including any newline characters |
ajWritelineNewline | Writes a string to a file, including any newline characters |
ajWritelineSpace | Writes a string to a file, with a leading space |
AjBool ajWriteline ( AjPFile file, const AjPStr line );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
const AjPStr | line | Input | String to be written |
AjBool | RETURN | True on success |
From EMBOSS 6.0.0
AjBool ajWritelineNewline ( AjPFile file, const AjPStr line );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
const AjPStr | line | Input | String to be written |
AjBool | RETURN | True on success |
From EMBOSS 6.2.0
AjBool ajWritelineSpace ( AjPFile file, const AjPStr line );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFile | file | Modify | Output file |
const AjPStr | line | Input | String to be written |
AjBool | RETURN | True on success |
From EMBOSS 6.2.0
Sections:
buffered file line read operations | Input |
Functions:
ajBuffreadLine | Reads a line from a buffered file. If the buffer has data, reads from the buffer. If the buffer is exhausted, reads from the file. If the file is exhausted, sets end of file and returns. If end of file was already set, looks for another file to open. |
ajBuffreadLinePos | Reads a line from a buffered file. If the buffer has data, reads from the buffer. If the buffer is exhausted, reads from the file. If the file is exhausted, sets end of file and returns. If end of file was already set, looks for another file to open. |
ajBuffreadLinePosStore | Reads a line from a buffered file. Also appends the line to a given string if the append flag is true. A double NULL character is added afterwards. If the buffer has data, reads from the buffer. If the buffer is exhausted, reads from the file. If the file is exhausted, sets end of file and returns. If end of file was already set, looks for another file to open. |
ajBuffreadLineStore | Reads a line from a buffered file. Also appends the line to a given string if the append flag is true. A double NULL character is added afterwards. If the buffer has data, reads from the buffer. If the buffer is exhausted, reads from the file. If the file is exhausted, sets end of file and returns. If end of file was already set, looks for another file to open. |
ajBuffreadLineTrim | Reads a line from a buffered file. If the buffer has data, reads from the buffer. If the buffer is exhausted, reads from the file. If the file is exhausted, sets end of file and returns. If end of file was already set, looks for another file to open. |
AjBool ajBuffreadLine ( AjPFilebuff buff, AjPStr* Pdest );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFilebuff | buff | Modify | Buffered input file. |
AjPStr* | Pdest | Output | Buffer to hold results. |
AjBool | RETURN | ajTrue if data was read. |
From EMBOSS 6.0.0
AjBool ajBuffreadLinePos ( AjPFilebuff buff, AjPStr* Pdest, ajlong* Ppos );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFilebuff | buff | Modify | Buffered input file. |
AjPStr* | Pdest | Output | Buffer to hold results. |
ajlong* | Ppos | Output | File position before the read. |
AjBool | RETURN | ajTrue if data was read. |
From EMBOSS 6.0.0
AjBool ajBuffreadLinePosStore ( AjPFilebuff buff, AjPStr* Pdest, ajlong* Ppos, AjBool dostore, AjPStr* Pstore );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFilebuff | buff | Modify | Buffered input file. |
AjPStr* | Pdest | Output | Buffer to hold results. |
ajlong* | Ppos | Output | File position before the read. |
AjBool | dostore | Input | append if true |
AjPStr* | Pstore | Output | string to append to |
AjBool | RETURN | ajTrue if data was read. |
From EMBOSS 6.0.0
AjBool ajBuffreadLineStore ( AjPFilebuff buff, AjPStr* Pdest, AjBool dostore, AjPStr* Pstore );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFilebuff | buff | Modify | Buffered input file. |
AjPStr* | Pdest | Output | Buffer to hold results. |
AjBool | dostore | Input | append if true |
AjPStr* | Pstore | Output | string to append to |
AjBool | RETURN | ajTrue if data was read. |
From EMBOSS 6.0.0
AjBool ajBuffreadLineTrim ( AjPFilebuff buff, AjPStr* Pdest );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPFilebuff | buff | Modify | Buffered input file. |
AjPStr* | Pdest | Output | Buffer to hold results. |
AjBool | RETURN | ajTrue if data was read. |
From EMBOSS 6.0.0