cmFileSys.h/c : Added cmFileSysMakeDirFn(),cmFileSysMakeUserDirFn().

This commit is contained in:
kevin 2016-07-13 17:39:05 -04:00
parent 5cfd2095c7
commit 0204c5084a
2 changed files with 21 additions and 0 deletions

View File

@ -515,7 +515,12 @@ const cmChar_t* cmFileSysMakeUserDir( cmFileSysH_t h, const cmChar_t* dir, ...
return retPtr;
}
const cmChar_t* cmFileSysMakeDirFn( cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn )
{ return cmFileSysMakeFn( h, dir, fn, NULL, NULL); }
const cmChar_t* cmFileSysMakeUserDirFn(cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn )
{ return cmFileSysMakeUserFn(h, dir, fn, NULL, NULL ); }
void cmFileSysFreeFn( cmFileSysH_t h, const cmChar_t* fn )
{
cmFs_t* p = _cmFileSysHandleToPtr(h);
@ -1248,6 +1253,12 @@ const cmChar_t* cmFsMakeUserFn( const cmChar_t* dirPrefix, const cmChar_t* fn,
return retPtr;
}
const cmChar_t* cmFsMakeDirFn(const cmChar_t* dir, const cmChar_t* fn )
{ return cmFileSysMakeDirFn(_cmFsH,dir,fn); }
const cmChar_t* cmFsMakeUserDirFn(const cmChar_t* dir, const cmChar_t* fn )
{ return cmFileSysMakeUserDirFn(_cmFsH,dir,fn); }
const cmChar_t* cmFsVMakeDir( const cmChar_t* dir, va_list vl )
{ return cmFileSysVMakeDir(_cmFsH,dir,vl); }

View File

@ -104,6 +104,13 @@ extern "C" {
const cmChar_t* cmFileSysMakeDir( cmFileSysH_t h, const cmChar_t* dir, ... );
const cmChar_t* cmFileSysVMakeUserDir( cmFileSysH_t h, const cmChar_t* dir, va_list vl );
const cmChar_t* cmFileSysMakeUserDir( cmFileSysH_t h, const cmChar_t* dir, ... );
// Equivalent to same named cmFileSysMake() functions but assumes a single directory prefix and the file name
// extension is attached to 'fn'.
const cmChar_t* cmFileSysMakeDirFn( cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn );
// Same as cmFileSysMakeDirFn() but prefixes 'dir' with the users home directory.
const cmChar_t* cmFileSysMakeUserDirFn(cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn );
// Release the file name created through an earlier call to cmFileSysMakeFn().
void cmFileSysFreeFn( cmFileSysH_t h, const cmChar_t* fn );
@ -242,6 +249,9 @@ extern "C" {
const cmChar_t* cmFsMakeDir( const cmChar_t* dirPrefix, ... );
const cmChar_t* cmFsVMakeUserDir( const cmChar_t* dirPrefix, va_list vl );
const cmChar_t* cmFsMakeUserDir( const cmChar_t* dirPrefix, ... );
const cmChar_t* cmFsMakeDirFn( const cmChar_t* dir, const cmChar_t* fn );
const cmChar_t* cmFsMakeUserDirFn(const cmChar_t* dir, const cmChar_t* fn );
void cmFsFreeFn( const cmChar_t* fn );
cmFsRC_t cmFsGenFn( const cmChar_t* dir, const cmChar_t* prefixStr, const cmChar_t* extStr, const cmChar_t** fnPtr );