HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_PathSearch Class Reference

#include <UT_PathSearch.h>

Classes

struct  CommonPaths
 

Public Member Functions

 UT_PathSearch (const char *defpath, int var_id, const char *carat_expand="", int at_expand=UT_HOUDINI_PATH)
 
 UT_PathSearch (const UT_PathSearch &copy)=default
 
void rehash ()
 
void extendPath (const char *defpath=0, int var_id=-1, const char *carat_expand=0, int at_expand=-1)
 
bool appendPath (const char *path, bool condensed=false)
 
bool removePath (const char *path)
 
bool prependPath (const char *path, bool condensed=false)
 
int findFile (UT_String &result, const char *search) const
 
int findFile (UT_WorkBuffer &result, const char *search) const
 
int findDirectory (UT_String &result, const char *search) const
 
bool findFileFromList (UT_String &result, const UT_StringArray &search_list) const
 
bool findDirectoryFromList (UT_String &result, const UT_StringArray &search_list) const
 
int findAllFiles (const char *search, UT_StringArray &list) const
 
int findAllDirectories (const char *search, UT_StringArray &list) const
 
int matchAllFiles (const char *extension, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int matchAllFiles (const UT_StringList &exts, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int matchAllFilesInSubdirectory (const char *extension, const char *subdirectory, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int matchAllFilesInSubdirectory (const UT_StringList &exts, const char *subdirectory, bool returnfullpaths, UT_StringArray &list, bool recurse=false, bool skip_dup_paths=false) const
 
int houdiniFindFile (const char *find, UT_String &result) const
 
int houdiniFindFile (const char *find, UT_WorkBuffer &result) const
 
int houdiniFindDirectory (const char *find, UT_String &result) const
 
int houdiniFindDirectory (const char *find, UT_WorkBuffer &r) const
 
int getEntries () const
 
const char * getPathComponent (int i) const
 
int getBaseEntries () const
 
const char * getBaseComponent (int i) const
 
const char * getCondensedComponent (int i) const
 
const char * getDefaultPath () const
 
const char * getCaratExpand () const
 
int getVariableId () const
 
int getAtExpand () const
 
void getHomeHoudiniSearch (UT_StringArray &strs) const
 

Static Public Member Functions

static bool pathMap (UT_String &path)
 
static bool pathMap (UT_StringHolder &result, const char *path)
 
static void pathMapSave (UT_WorkBuffer &wbuf, bool pretty)
 
static void pathMapLoad (const char *dict)
 
static void pathMapAdd (const char *src, const char *dest, bool case_sensitive)
 
static bool pathMapRemove (const char *src)
 
static UT_KnownPath lookupPath (const char *name)
 
static const char * lookupPath (UT_KnownPath path)
 
static const UT_PathSearchgetInstance (UT_KnownPath path_type)
 
static UT_PathSearchgetHardPath (UT_KnownPath path_type)
 
static void rehashAll ()
 
static void rehashSpecific (UT_KnownPath pathid)
 
static int condenseHip (UT_String &path)
 
static int condenseHip (UT_WorkBuffer &path)
 
static int condenseJob (UT_String &path)
 
static bool condensePath (UT_WorkBuffer &result, const char *source_path, const char *const paths[], const char *const condensed_paths[], int npaths)
 
static bool condensePath (UT_String &path, const char *source_path, const char *const paths[], const char *const condensed_paths[], int npaths)
 
static bool condensePath (UT_String &path, const char *const paths[], const char *const condensed_paths[], int npaths)
 
static int stripLeadPath (UT_String &path, UT_KnownPath pathvar)
 
static int stripMaxLeadPath (UT_String &path, UT_KnownPath pathvar)
 
static bool resolveAbsolutePath (const char *filename, UT_String &absolute_path)
 
static void splitPath (const char *path, UT_StringArray &list, const char *insert_path)
 
static void getHomeHoudini (UT_String &str)
 
static SYS_NO_DISCARD_RESULT
UT_StringHolder 
getHomeHoudini ()
 
static bool condenseCommon (UT_String &path)
 
static bool condenseCommon (UT_WorkBuffer &path)
 
static bool condenseCommon (UT_String &condensed, const char *path)
 
static bool condenseCommon (UT_WorkBuffer &condensed, const char *path)
 
static bool condenseCommon (UT_String &path, const CommonPaths &common)
 
static bool condenseCommon (UT_WorkBuffer &path, const CommonPaths &common)
 
static bool condenseCommon (UT_String &path, const char *source_path, const CommonPaths &common)
 
static bool condenseCommon (UT_WorkBuffer &path, const char *source_path, const CommonPaths &common)
 

Detailed Description

Definition at line 54 of file UT_PathSearch.h.

Constructor & Destructor Documentation

UT_PathSearch::UT_PathSearch ( const char *  defpath,
int  var_id,
const char *  carat_expand = "",
int  at_expand = UT_HOUDINI_PATH 
)
UT_PathSearch::UT_PathSearch ( const UT_PathSearch copy)
default

Member Function Documentation

bool UT_PathSearch::appendPath ( const char *  path,
bool  condensed = false 
)
static bool UT_PathSearch::condenseCommon ( UT_String path)
inlinestatic

Definition at line 233 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer path)
inlinestatic

Definition at line 243 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_String condensed,
const char *  path 
)
inlinestatic

Definition at line 253 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer condensed,
const char *  path 
)
inlinestatic

Definition at line 263 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_String path,
const CommonPaths common 
)
inlinestatic

Definition at line 270 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer path,
const CommonPaths common 
)
inlinestatic

Definition at line 276 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_String path,
const char *  source_path,
const CommonPaths common 
)
inlinestatic

Definition at line 282 of file UT_PathSearch.h.

static bool UT_PathSearch::condenseCommon ( UT_WorkBuffer path,
const char *  source_path,
const CommonPaths common 
)
inlinestatic

Definition at line 290 of file UT_PathSearch.h.

static int UT_PathSearch::condenseHip ( UT_String path)
static
static int UT_PathSearch::condenseHip ( UT_WorkBuffer path)
static
static int UT_PathSearch::condenseJob ( UT_String path)
static
static bool UT_PathSearch::condensePath ( UT_WorkBuffer result,
const char *  source_path,
const char *const  paths[],
const char *const  condensed_paths[],
int  npaths 
)
static
static bool UT_PathSearch::condensePath ( UT_String path,
const char *  source_path,
const char *const  paths[],
const char *const  condensed_paths[],
int  npaths 
)
inlinestatic

Definition at line 309 of file UT_PathSearch.h.

static bool UT_PathSearch::condensePath ( UT_String path,
const char *const  paths[],
const char *const  condensed_paths[],
int  npaths 
)
inlinestatic

Definition at line 326 of file UT_PathSearch.h.

void UT_PathSearch::extendPath ( const char *  defpath = 0,
int  var_id = -1,
const char *  carat_expand = 0,
int  at_expand = -1 
)
int UT_PathSearch::findAllDirectories ( const char *  search,
UT_StringArray list 
) const
int UT_PathSearch::findAllFiles ( const char *  search,
UT_StringArray list 
) const
int UT_PathSearch::findDirectory ( UT_String result,
const char *  search 
) const
bool UT_PathSearch::findDirectoryFromList ( UT_String result,
const UT_StringArray search_list 
) const
int UT_PathSearch::findFile ( UT_String result,
const char *  search 
) const
int UT_PathSearch::findFile ( UT_WorkBuffer result,
const char *  search 
) const
bool UT_PathSearch::findFileFromList ( UT_String result,
const UT_StringArray search_list 
) const
int UT_PathSearch::getAtExpand ( ) const
inline

Definition at line 202 of file UT_PathSearch.h.

const char* UT_PathSearch::getBaseComponent ( int  i) const
inline

Definition at line 194 of file UT_PathSearch.h.

int UT_PathSearch::getBaseEntries ( ) const
inline

Definition at line 193 of file UT_PathSearch.h.

const char* UT_PathSearch::getCaratExpand ( ) const
inline

Definition at line 199 of file UT_PathSearch.h.

const char* UT_PathSearch::getCondensedComponent ( int  i) const
inline

Definition at line 195 of file UT_PathSearch.h.

const char* UT_PathSearch::getDefaultPath ( ) const
inline

Definition at line 198 of file UT_PathSearch.h.

int UT_PathSearch::getEntries ( ) const
inline

Definition at line 188 of file UT_PathSearch.h.

static UT_PathSearch* UT_PathSearch::getHardPath ( UT_KnownPath  path_type)
static
static void UT_PathSearch::getHomeHoudini ( UT_String str)
static
static SYS_NO_DISCARD_RESULT UT_StringHolder UT_PathSearch::getHomeHoudini ( )
static
void UT_PathSearch::getHomeHoudiniSearch ( UT_StringArray strs) const
static const UT_PathSearch* UT_PathSearch::getInstance ( UT_KnownPath  path_type)
static
const char* UT_PathSearch::getPathComponent ( int  i) const
inline

Definition at line 189 of file UT_PathSearch.h.

int UT_PathSearch::getVariableId ( ) const
inline

Definition at line 201 of file UT_PathSearch.h.

int UT_PathSearch::houdiniFindDirectory ( const char *  find,
UT_String result 
) const
int UT_PathSearch::houdiniFindDirectory ( const char *  find,
UT_WorkBuffer r 
) const
int UT_PathSearch::houdiniFindFile ( const char *  find,
UT_String result 
) const
int UT_PathSearch::houdiniFindFile ( const char *  find,
UT_WorkBuffer result 
) const
static UT_KnownPath UT_PathSearch::lookupPath ( const char *  name)
static

Given a variable name (e.g. "HOUDINI_PATH") return the known path enum associated with it. If the name doesn't match a known path, the function will return UT_MAX_KNOWN_PATHS.

static const char* UT_PathSearch::lookupPath ( UT_KnownPath  path)
static

Given a known path, return the variable name associated with the path Returns nullptr on error.

int UT_PathSearch::matchAllFiles ( const char *  extension,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
int UT_PathSearch::matchAllFiles ( const UT_StringList exts,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
int UT_PathSearch::matchAllFilesInSubdirectory ( const char *  extension,
const char *  subdirectory,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
int UT_PathSearch::matchAllFilesInSubdirectory ( const UT_StringList exts,
const char *  subdirectory,
bool  returnfullpaths,
UT_StringArray list,
bool  recurse = false,
bool  skip_dup_paths = false 
) const
static bool UT_PathSearch::pathMap ( UT_String path)
static
static bool UT_PathSearch::pathMap ( UT_StringHolder result,
const char *  path 
)
static
static void UT_PathSearch::pathMapAdd ( const char *  src,
const char *  dest,
bool  case_sensitive 
)
static
static void UT_PathSearch::pathMapLoad ( const char *  dict)
static
static bool UT_PathSearch::pathMapRemove ( const char *  src)
static
static void UT_PathSearch::pathMapSave ( UT_WorkBuffer wbuf,
bool  pretty 
)
static
bool UT_PathSearch::prependPath ( const char *  path,
bool  condensed = false 
)
void UT_PathSearch::rehash ( )
static void UT_PathSearch::rehashAll ( )
static
static void UT_PathSearch::rehashSpecific ( UT_KnownPath  pathid)
static
bool UT_PathSearch::removePath ( const char *  path)
static bool UT_PathSearch::resolveAbsolutePath ( const char *  filename,
UT_String absolute_path 
)
static
static void UT_PathSearch::splitPath ( const char *  path,
UT_StringArray list,
const char *  insert_path 
)
static
static int UT_PathSearch::stripLeadPath ( UT_String path,
UT_KnownPath  pathvar 
)
static
static int UT_PathSearch::stripMaxLeadPath ( UT_String path,
UT_KnownPath  pathvar 
)
static

The documentation for this class was generated from the following file: