InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CHLUtils Class Reference

#include <CHLUtils.h>

Static Public Member Functions

static ErrorCode GetApplicationFolder (PMString &appFolder)
 
static ICoreFilenameQueryCoreFilename (const PMString &fullPath)
 
static void RemoveLastElement (PMString &fromthis)
 
static IPMStreamCreateFileStreamRead (const PMString &fullPath)
 
static ErrorCode FileExistsForRead (const PMString &fullPath)
 

Detailed Description

Utility helper class used in this plug-in.

Member Function Documentation

IPMStream * CHLUtils::CreateFileStreamRead (const PMStringfullPath)
static

Creates a file stream fo reading, using the given path.

Parameters
fullPathIN Full path to file to open for reading.
Returns
IPMStream of the opened file. Nil if failure.
ErrorCode CHLUtils::FileExistsForRead (const PMStringfullPath)
static

Tests if the file exists and can be read.

Parameters
fullPathIN Full path to file to open for reading.
Returns
kSuccess if file exists, kFailure otherwise.
ErrorCode CHLUtils::GetApplicationFolder (PMStringappFolder)
static

Gets the application folder. From this folder, you can get the "Plug-Ins" folder.

NOTE: For the Macintosh platform, this returns the InDesign installation folder path, not the path inside the package folder where the actual InDesign application binary resides.

Parameters
appFolderOUT The complete path to the application folder.
Returns
kSuccess if success, kFailure otherwise.
static ICoreFilename* CHLUtils::QueryCoreFilename (const PMStringfullPath)
static

Queries the ICoreFileName. Unimplemented.

void CHLUtils::RemoveLastElement (PMStringfromthis)
static

Removes the last element from the path. We search for the last delimeter and knock off the stuff that comes after. We lose this data so beware!

Parameters
fromthisIN/OUT Path from which you want to remove last element.