Harlequin RIP SDK

Platform independent implementation of the skinkit file I/O interfaces. More...

#include "skinkit.h"
#include "hqassert.h"
#include "file.h"
#include <string.h>
#include <stdio.h>

Functions

static HqBool findSW (const uint8 *abzSearchRoot, uint8 *abzSWDir, const char *fileext)
 Utility function to search for the SW folder relative to a specific root. More...
 
HqBool PKSWDir (uint8 *pSWDir)
 Copy the SW directory name into the buffer provided. This directory will be terminated with a directory separator. More...
 
HqBool PKSetSWDir (const uint8 *pSWDir)
 Record an explicit path to the SW folder, overriding any default search rules. More...
 
HqBool PKSWWriteRAM (void)
 Return a boolean indicating if a RAM device should be mounted for writing files. A RAM device may be used as the writable folder for files when using a union device. More...
 
uint8PKSWWriteDir (void)
 Return the writable SW directory name, if set. More...
 
HqBool PKSetSWWriteDir (uint8 *pSWDir)
 Record an explicit path to a writable SW folder. More...
 

Variables

static HqBool pkswdir_called = FALSE
 Have we called PKSWDir?
 
static uint8 swWriteDir [LONGESTFILENAME]
 

Detailed Description

Platform independent implementation of the skinkit file I/O interfaces.

Function Documentation

◆ findSW()

static HqBool findSW ( const uint8 abzSearchRoot,
uint8 abzSWDir,
const char *  fileext 
)
static

Utility function to search for the SW folder relative to a specific root.

Parameters
abzSearchRootThe root folder to search from.
abzSWDirContainer (big enough to store at least LONGESTFILENAME characters) which will contain the path to the SW folder (if found).
fileextA file extension, if we are searching for a file, or NULL to search for a directory.
Returns
TRUE if the SW folder or file was found.

Variable Documentation

◆ swWriteDir

uint8 swWriteDir[LONGESTFILENAME]
static

This buffer holds the path to a writable SW folder, as stored by PKSetSWWriteDir(). This is only used if the union device is active, to set a different directory to write to.