void tsmMakeDirIfNotExist ( const char *dirname, int isDir )

Create a directory tree

Documentation

Create a directory tree.

Takes a directory name and will create that directory if it does not already exist. This routine will create all of the intermediate directories necessary, e.g. if you ask to create "/a/b/c/d", but only "/a" exists, then this function will create "/a/b", then "/a/b/c", and then finally "/a/b/c/d".

The second parameter specifies whether the string in the first parameter contains a directory name only (TSM_PATH_ONLY), or whether it also contains a filename at the end (TSM_PATH_AND_FILE). This enables you to pass a full filename to the function and it will create all of the directory structure necessary for that file, i.e. if ( isDir==TSM_PATH_AND_FILE ), then the last part of dirname is ignored.

Returns:
Nothing (void)
Parameters:
dirname - the directory or full filename of the target
isDir - one of TSM_PATH_ONLY or TSM_PATH_AND_FILE, refering to the dirname string
Author:
Martin Reddy
Version:
15 July 1997
See Also:


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page