pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
|
A crossplatform file reading/writing utility. More...
Defines | |
#define | PLANKFILE_READ (1 << 0) |
Flag to identify 'read' mode. | |
#define | PLANKFILE_WRITE (1 << 1) |
Flag to identify 'write' mode. | |
#define | PLANKFILE_BINARY (1 << 2) |
Flag to identify 'binary' mode. | |
#define | PLANKFILE_APPEND (1 << 3) |
Flag to identify 'append' mode. | |
#define | PLANKFILE_NEW (1 << 4) |
Flag to identify 'new' mode. | |
#define | PLANKFILE_BIGENDIAN (1 << 5) |
Flag to identify big endian mode for binary files (otherwise it will be little endian). | |
#define | PLANKFILE_OWNMULTI (1 << 6) |
Flag to identify that a multi file object should be owned by the File object. | |
#define | PLANKFILE_DYNAMICARRAYOWNED (1 << 6) |
Flag to identify when in DynamciArray mode that the array is owned by this object. | |
#define | PLANKFILE_MASK (PLANKFILE_READ | PLANKFILE_WRITE | PLANKFILE_BINARY | PLANKFILE_APPEND | PLANKFILE_NEW) |
Mode mask with all the mode flags except PLANKFILE_BIGENDIAN. | |
#define | PLANKFILE_ALL (PLANKFILE_MASK | PLANKFILE_BIGENDIAN) |
Mode mask with all the mode flags. | |
Typedefs | |
typedef struct PlankFile * | PlankFileRef |
An opaque reference to the Plank File object. | |
Functions | |
PlankResult | pl_FileErase (const char *filepath) |
Delete a file with the given path form the filesystem. | |
PlankFileRef | pl_File_CreateAndInit () |
Create and initialise a Plank File object and return an oqaque reference to it. | |
PlankFileRef | pl_File_Create () |
Create a Plank File object and return an oqaque reference to it. | |
PlankResult | pl_File_Init (PlankFileRef p) |
Initialise a Plank File object. | |
PlankResult | pl_File_DeInit (PlankFileRef p) |
Deinitialise a Plank File object. | |
PlankResult | pl_File_Destroy (PlankFileRef p) |
Destroy a Plank File object. | |
PlankResult | pl_File_Open (PlankFileRef p, const char *filepath, const int mode) |
Open a file. | |
PlankResult | pl_File_OpenTextRead (PlankFileRef p, const char *filepath, const PlankB andWrite) |
Open a text file for reading and optionally writing. | |
PlankResult | pl_File_OpenTextWrite (PlankFileRef p, const char *filepath, const PlankB andRead, const PlankB replaceExistingFile) |
Open a text file for writing and optionally reading. | |
PlankResult | pl_File_OpenBinaryRead (PlankFileRef p, const char *filepath, const PlankB andWrite, const PlankB isBigEndian) |
Open a binary file for reading and optionally writing. | |
PlankResult | pl_File_OpenBinaryWrite (PlankFileRef p, const char *filepath, const PlankB andRead, const PlankB replaceExistingFile, const PlankB isBigEndian) |
Open a binary file for writing and optionally reading. | |
PlankResult | pl_File_OpenBinaryNativeEndianRead (PlankFileRef p, const char *filepath, const PlankB andWrite) |
Open a binary file for reading and optionally writing in the native endian format. | |
PlankResult | pl_File_OpenBinaryNativeEndianWrite (PlankFileRef p, const char *filepath, const PlankB andRead, const PlankB replaceExistingFile) |
Open a binary file for writing and optionally reading in the native endian format. | |
PlankB | pl_File_IsBigEndian (PlankFileRef p) |
Determine if a file object is in big endian format. | |
PlankB | pl_File_IsLittleEndian (PlankFileRef p) |
Determine if a file object is in little endian format. | |
PlankB | pl_File_IsNativeEndian (PlankFileRef p) |
Determine if a file object is in the native endian format. | |
PlankResult | pl_File_Close (PlankFileRef p) |
Close a file. | |
PlankResult | pl_File_SetPosition (PlankFileRef p, const PlankLL position) |
Set the current position of the file read/write pointer. | |
PlankResult | pl_File_OffsetPosition (PlankFileRef p, const PlankLL offset) |
Offset the current position of the file read/write pointer. | |
PlankResult | pl_File_ResetPosition (PlankFileRef p) |
Reset the current position of the file read/write pointer to the start of the file. | |
PlankResult | pl_File_SetPositionEnd (PlankFileRef p) |
Set the current position of the file read/write pointer to the end of the file. | |
PlankB | pl_File_IsValid (PlankFileRef p) |
Determine if a file object is valid. | |
PlankB | pl_File_IsEOF (PlankFileRef p) |
Determine if a file object read/write pointer has reached the end of the file. | |
PlankResult | pl_File_SetEOF (PlankFileRef p) |
Sets the file object read/write pointer to the end of the file. | |
PlankResult | pl_File_GetPosition (PlankFileRef p, PlankLL *position) |
Get the current position of the file read/write pointer. | |
PlankResult | pl_File_SetMode (PlankFileRef p, const int mode) |
Reopen the file with a different mode (e.g, read/write/binary etc). | |
PlankResult | pl_File_Read (PlankFileRef p, PlankP data, const int maximumBytes, int *bytesRead) |
Read an array of bytes from the file. | |
PlankResult | pl_File_ReadC (PlankFileRef p, char *data) |
Read one signed byte from the file. | |
PlankResult | pl_File_ReadS (PlankFileRef p, short *data) |
Read a short from the file (16-bit int). | |
PlankResult | pl_File_ReadI (PlankFileRef p, int *data) |
Read an int from the file (32-bit int). | |
PlankResult | pl_File_ReadI24 (PlankFileRef p, PlankI24 *data) |
Read a 24-bit int from the file (i.e. | |
PlankResult | pl_File_ReadLL (PlankFileRef p, PlankLL *data) |
Read a long from the file. | |
PlankResult | pl_File_ReadUC (PlankFileRef p, unsigned char *data) |
Read one unsigned byte from the file. | |
PlankResult | pl_File_ReadUS (PlankFileRef p, unsigned short *data) |
Read an unsigned short from the file (16-bit int). | |
PlankResult | pl_File_ReadUI (PlankFileRef p, unsigned int *data) |
Read an unsigned int from the file (32-bit int). | |
PlankResult | pl_File_ReadUI24 (PlankFileRef p, PlankUI24 *data) |
Read an unsigned 24-bit int from the file (i.e. | |
PlankResult | pl_File_ReadUL (PlankFileRef p, PlankUL *data) |
Read a long from the file. | |
PlankResult | pl_File_ReadULL (PlankFileRef p, PlankULL *data) |
Read an unsigned 64-bit int from the file (i.e. | |
PlankResult | pl_File_ReadF (PlankFileRef p, float *data) |
Read a float from the file (32-bit float). | |
PlankResult | pl_File_ReadD (PlankFileRef p, double *data) |
Read a double from the file (64-bit float). | |
PlankResult | pl_File_ReadLine (PlankFileRef p, char *text, const int maximumLength) |
Read an array of bytes as text upto the next line ending (or the end of the file if sooner). | |
PlankResult | pl_File_SkipBytes (PlankFileRef p, const int numBytes) |
Skip over a number of bytes in the file. | |
PlankResult | pl_File_Write (PlankFileRef p, const void *data, const int maximumBytes) |
Write an array of bytes to the file. | |
PlankResult | pl_File_WriteC (PlankFileRef p, char data) |
Write one signed byte to the file. | |
PlankResult | pl_File_WriteS (PlankFileRef p, short data) |
Write a short to the file (16-bit int). | |
PlankResult | pl_File_WriteI (PlankFileRef p, int data) |
Write an int to the file (32-bit int). | |
PlankResult | pl_File_WriteI24 (PlankFileRef p, PlankI24 data) |
Write a 24-bit int to the file (i.e., 3 bytes). | |
PlankResult | pl_File_WriteLL (PlankFileRef p, PlankLL data) |
Write a long to the file. | |
PlankResult | pl_File_WriteUC (PlankFileRef p, unsigned char data) |
Write one unsigned byte to the file. | |
PlankResult | pl_File_WriteUS (PlankFileRef p, unsigned short data) |
Write an unsigned short to the file (16-bit int). | |
PlankResult | pl_File_WriteUI (PlankFileRef p, unsigned int data) |
Write an unsigned int to the file (32-bit int). | |
PlankResult | pl_File_WriteUI24 (PlankFileRef p, PlankUI24 data) |
Write an unsigned 24-bit int to the file (i.e., 3 bytes). | |
PlankResult | pl_File_WriteUL (PlankFileRef p, PlankUL data) |
Write an unisigned long to the file. | |
PlankResult | pl_File_WriteULL (PlankFileRef p, PlankULL data) |
Write an unsigned 64-bit int to the file. | |
PlankResult | pl_File_WriteF (PlankFileRef p, float data) |
Write a float to the file (32-bit float). | |
PlankResult | pl_File_WriteD (PlankFileRef p, double data) |
Write a double to the file (64-bit float). | |
PlankResult | pl_File_WriteString (PlankFileRef p, const char *text) |
Write string to the file. | |
PlankResult | pl_File_WriteLine (PlankFileRef p, const char *text) |
Write line of text to the file. |
A crossplatform file reading/writing utility.
Most of the "member functions" return a PlankResult which is a status and/or error code.
#define PLANKFILE_ALL (PLANKFILE_MASK | PLANKFILE_BIGENDIAN) |
Mode mask with all the mode flags.
#define PLANKFILE_APPEND (1 << 3) |
Flag to identify 'append' mode.
#define PLANKFILE_BIGENDIAN (1 << 5) |
Flag to identify big endian mode for binary files (otherwise it will be little endian).
#define PLANKFILE_BINARY (1 << 2) |
Flag to identify 'binary' mode.
#define PLANKFILE_DYNAMICARRAYOWNED (1 << 6) |
Flag to identify when in DynamciArray mode that the array is owned by this object.
#define PLANKFILE_MASK (PLANKFILE_READ | PLANKFILE_WRITE | PLANKFILE_BINARY | PLANKFILE_APPEND | PLANKFILE_NEW) |
Mode mask with all the mode flags except PLANKFILE_BIGENDIAN.
#define PLANKFILE_NEW (1 << 4) |
Flag to identify 'new' mode.
#define PLANKFILE_OWNMULTI (1 << 6) |
Flag to identify that a multi file object should be owned by the File object.
#define PLANKFILE_READ (1 << 0) |
Flag to identify 'read' mode.
#define PLANKFILE_WRITE (1 << 1) |
Flag to identify 'write' mode.
typedef struct PlankFile* PlankFileRef |
An opaque reference to the Plank File object.
PlankResult pl_File_Close | ( | PlankFileRef | p | ) |
Close a file.
p | The Plank File object. |
PlankFileRef pl_File_Create | ( | ) |
Create a Plank File object and return an oqaque reference to it.
PlankFileRef pl_File_CreateAndInit | ( | ) |
Create and initialise a Plank File object and return an oqaque reference to it.
PlankResult pl_File_DeInit | ( | PlankFileRef | p | ) |
Deinitialise a Plank File object.
This also closes the file if it is still open.
p | The Plank File object. |
PlankResult pl_File_Destroy | ( | PlankFileRef | p | ) |
Destroy a Plank File object.
This also closes the file if it is still open.
p | The Plank File object. |
PlankResult pl_File_GetPosition | ( | PlankFileRef | p, |
PlankLL * | position | ||
) |
Get the current position of the file read/write pointer.
p | The Plank File object. |
position | A pointer to a variable that will receive the result. |
PlankResult pl_File_Init | ( | PlankFileRef | p | ) |
Initialise a Plank File object.
p | The Plank File object. |
PlankB pl_File_IsBigEndian | ( | PlankFileRef | p | ) |
Determine if a file object is in big endian format.
p | The Plank File object. |
true
if the file object refers to a file opened in big endian format, othewise returns false
(i.e., it is litte endian). PlankB pl_File_IsEOF | ( | PlankFileRef | p | ) |
Determine if a file object read/write pointer has reached the end of the file.
p | The Plank File object. |
true
if the file read/write pointer has reached the end of the file, otherwise false
. PlankB pl_File_IsLittleEndian | ( | PlankFileRef | p | ) |
Determine if a file object is in little endian format.
p | The Plank File object. |
true
if the file object refers to a file opened in little endian format, othewise returns false
(i.e., it is big endian). PlankB pl_File_IsNativeEndian | ( | PlankFileRef | p | ) |
Determine if a file object is in the native endian format.
p | The Plank File object. |
true
if the file object refers to a file opened in endian format of the machine on which this is running, othewise returns false
. PlankB pl_File_IsValid | ( | PlankFileRef | p | ) |
Determine if a file object is valid.
This currently checks only if the file object is null.
p | The Plank File object. |
true
if the file object is not null. PlankResult pl_File_OffsetPosition | ( | PlankFileRef | p, |
const PlankLL | offset | ||
) |
Offset the current position of the file read/write pointer.
p | The Plank File object. |
offset | The offset by which to move the file read/write pointer. |
PlankResult pl_File_Open | ( | PlankFileRef | p, |
const char * | filepath, | ||
const int | mode | ||
) |
Open a file.
p | The Plank File object. |
filepath | The filepath of the file to open. |
mode | A bit mask code to identify the mode in which to open the file. |
PlankResult pl_File_OpenBinaryNativeEndianRead | ( | PlankFileRef | p, |
const char * | filepath, | ||
const PlankB | andWrite | ||
) |
Open a binary file for reading and optionally writing in the native endian format.
This will open a file for reading/writing in little endian format on little endian machines (x86, x86_64, ARM etc) and big endian format on big endian machines (e.g., PPC).
p | The Plank File object. |
filepath | The filepath of the file to open. |
andWrite | If true the file will also be opened for writing. |
PlankResult pl_File_OpenBinaryNativeEndianWrite | ( | PlankFileRef | p, |
const char * | filepath, | ||
const PlankB | andRead, | ||
const PlankB | replaceExistingFile | ||
) |
Open a binary file for writing and optionally reading in the native endian format.
This will open a file for reading/writing in little endian format on little endian machines (x86, x86_64, ARM etc) and big endian format on big endian machines (e.g., PPC).
p | The Plank File object. |
filepath | The filepath of the file to open. |
andRead | If true the file will also be opened for reading. |
replaceExistingFile | If true any exising file will be erased otherwise data will be appended to the existing file. |
PlankResult pl_File_OpenBinaryRead | ( | PlankFileRef | p, |
const char * | filepath, | ||
const PlankB | andWrite, | ||
const PlankB | isBigEndian | ||
) |
Open a binary file for reading and optionally writing.
p | The Plank File object. |
filepath | The filepath of the file to open. |
andWrite | If true the file will also be opened for writing. |
isBigEndian | Set to true to write multibyte values in big endian format, otherwise write in little endian format. |
PlankResult pl_File_OpenBinaryWrite | ( | PlankFileRef | p, |
const char * | filepath, | ||
const PlankB | andRead, | ||
const PlankB | replaceExistingFile, | ||
const PlankB | isBigEndian | ||
) |
Open a binary file for writing and optionally reading.
p | The Plank File object. |
filepath | The filepath of the file to open. |
andRead | If true the file will also be opened for reading. |
replaceExistingFile | If true any exising file will be erased otherwise data will be appended to the existing file. |
isBigEndian | Set to true to write multibyte values in big endian format, otherwise write in little endian format. |
PlankResult pl_File_OpenTextRead | ( | PlankFileRef | p, |
const char * | filepath, | ||
const PlankB | andWrite | ||
) |
Open a text file for reading and optionally writing.
p | The Plank File object. |
filepath | The filepath of the file to open. |
andWrite | If true the file will also be opened for writing. |
PlankResult pl_File_OpenTextWrite | ( | PlankFileRef | p, |
const char * | filepath, | ||
const PlankB | andRead, | ||
const PlankB | replaceExistingFile | ||
) |
Open a text file for writing and optionally reading.
p | The Plank File object. |
filepath | The filepath of the file to open. |
andRead | If true the file will also be opened for reading. |
replaceExistingFile | If true any exising file will be erased otherwise data will be appended to the existing file. |
PlankResult pl_File_Read | ( | PlankFileRef | p, |
PlankP | data, | ||
const int | maximumBytes, | ||
int * | bytesRead | ||
) |
Read an array of bytes from the file.
NB as this reads raw bytes it takes no account of the likely endian format of any data read.
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
maximumBytes | The number of bytes to read. |
bytesRead | On return contains the number of bytes read (pass PLANK_NULL to ignore this). |
PlankResult pl_File_ReadC | ( | PlankFileRef | p, |
char * | data | ||
) |
Read one signed byte from the file.
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadD | ( | PlankFileRef | p, |
double * | data | ||
) |
Read a double from the file (64-bit float).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadF | ( | PlankFileRef | p, |
float * | data | ||
) |
Read a float from the file (32-bit float).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadI | ( | PlankFileRef | p, |
int * | data | ||
) |
Read an int from the file (32-bit int).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadI24 | ( | PlankFileRef | p, |
PlankI24 * | data | ||
) |
Read a 24-bit int from the file (i.e.
3 bytes).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadLine | ( | PlankFileRef | p, |
char * | text, | ||
const int | maximumLength | ||
) |
Read an array of bytes as text upto the next line ending (or the end of the file if sooner).
p | The Plank File object. |
text | A pointer to the memory location that will receive the data. |
maximumLength | The maximum number of bytes to read. |
PlankResult pl_File_ReadLL | ( | PlankFileRef | p, |
PlankLL * | data | ||
) |
Read a long from the file.
This will be a 32-bit int on 32-bit systems (i.e., 4 bytes) and a 64-bit int on 64-bit systems (i.e., 8 bytes) even on Windows where a 'long' is normally 32 bits on both architectures.
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadS | ( | PlankFileRef | p, |
short * | data | ||
) |
Read a short from the file (16-bit int).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadUC | ( | PlankFileRef | p, |
unsigned char * | data | ||
) |
Read one unsigned byte from the file.
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadUI | ( | PlankFileRef | p, |
unsigned int * | data | ||
) |
Read an unsigned int from the file (32-bit int).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadUI24 | ( | PlankFileRef | p, |
PlankUI24 * | data | ||
) |
Read an unsigned 24-bit int from the file (i.e.
3 bytes).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadUL | ( | PlankFileRef | p, |
PlankUL * | data | ||
) |
Read a long from the file.
This will be a 32-bit int on 32-bit systems (i.e., 4 bytes) and a 64-bit int on 64-bit systems (i.e., 8 bytes) even on Windows where a 'long' is normally 32 bits on both architectures.
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadULL | ( | PlankFileRef | p, |
PlankULL * | data | ||
) |
Read an unsigned 64-bit int from the file (i.e.
8 bytes).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ReadUS | ( | PlankFileRef | p, |
unsigned short * | data | ||
) |
Read an unsigned short from the file (16-bit int).
p | The Plank File object. |
data | A pointer to the memory location that will receive the data. |
PlankResult pl_File_ResetPosition | ( | PlankFileRef | p | ) |
Reset the current position of the file read/write pointer to the start of the file.
p | The Plank File object. |
PlankResult pl_File_SetEOF | ( | PlankFileRef | p | ) |
Sets the file object read/write pointer to the end of the file.
p | The Plank File object. |
PlankResult pl_File_SetMode | ( | PlankFileRef | p, |
const int | mode | ||
) |
Reopen the file with a different mode (e.g, read/write/binary etc).
p | The Plank File object. |
mode | A bit mask code to identify the mode in which to open the file. |
PlankResult pl_File_SetPosition | ( | PlankFileRef | p, |
const PlankLL | position | ||
) |
Set the current position of the file read/write pointer.
p | The Plank File object. |
position | The position within the file in bytes. |
PlankResult pl_File_SetPositionEnd | ( | PlankFileRef | p | ) |
Set the current position of the file read/write pointer to the end of the file.
p | The Plank File object. |
PlankResult pl_File_SkipBytes | ( | PlankFileRef | p, |
const int | numBytes | ||
) |
Skip over a number of bytes in the file.
p | The Plank File object. |
numBytes | The number of bytes to skip. |
PlankResult pl_File_Write | ( | PlankFileRef | p, |
const void * | data, | ||
const int | maximumBytes | ||
) |
Write an array of bytes to the file.
NB as this reads raw bytes it takes no account of the likely endian format of any data read.
p | The Plank File object. |
data | A pointer to the memory location that is the source of the data. |
maximumBytes | The number of bytes to write. |
PlankResult pl_File_WriteC | ( | PlankFileRef | p, |
char | data | ||
) |
Write one signed byte to the file.
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteD | ( | PlankFileRef | p, |
double | data | ||
) |
Write a double to the file (64-bit float).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteF | ( | PlankFileRef | p, |
float | data | ||
) |
Write a float to the file (32-bit float).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteI | ( | PlankFileRef | p, |
int | data | ||
) |
Write an int to the file (32-bit int).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteI24 | ( | PlankFileRef | p, |
PlankI24 | data | ||
) |
Write a 24-bit int to the file (i.e., 3 bytes).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteLine | ( | PlankFileRef | p, |
const char * | text | ||
) |
Write line of text to the file.
This writes until it hits the first null character in the string and adds carriage return and line feed characters.
p | The Plank File object. |
text | The string to write. |
PlankResult pl_File_WriteLL | ( | PlankFileRef | p, |
PlankLL | data | ||
) |
Write a long to the file.
This will be a 32-bit int on 32-bit systems (i.e., 4 bytes) and a 64-bit int on 64-bit systems (i.e., 8 bytes) even on Windows where a 'long' is normally 32 bits on both architectures.
p | The Plank File object. |
data | The value to write. |
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteS | ( | PlankFileRef | p, |
short | data | ||
) |
Write a short to the file (16-bit int).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteString | ( | PlankFileRef | p, |
const char * | text | ||
) |
Write string to the file.
This writes until it hits the first null character in the string.
p | The Plank File object. |
text | The string to write. |
PlankResult pl_File_WriteUC | ( | PlankFileRef | p, |
unsigned char | data | ||
) |
Write one unsigned byte to the file.
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteUI | ( | PlankFileRef | p, |
unsigned int | data | ||
) |
Write an unsigned int to the file (32-bit int).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteUI24 | ( | PlankFileRef | p, |
PlankUI24 | data | ||
) |
Write an unsigned 24-bit int to the file (i.e., 3 bytes).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteUL | ( | PlankFileRef | p, |
PlankUL | data | ||
) |
Write an unisigned long to the file.
This will be a 32-bit int on 32-bit systems (i.e., 4 bytes) and a 64-bit int on 64-bit systems (i.e., 8 bytes) even on Windows where a 'long' is normally 32 bits on both architectures.
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteULL | ( | PlankFileRef | p, |
PlankULL | data | ||
) |
Write an unsigned 64-bit int to the file.
p | The Plank File object. |
data | The value to write. |
PlankResult pl_File_WriteUS | ( | PlankFileRef | p, |
unsigned short | data | ||
) |
Write an unsigned short to the file (16-bit int).
p | The Plank File object. |
data | The value to write. |
PlankResult pl_FileErase | ( | const char * | filepath | ) |
Delete a file with the given path form the filesystem.