void CBUtils::CreatePath(const char* Path, bool PathOnly)
{
	AnsiString path;

	if (!PathOnly) path = PathUtil::GetDirectoryName(Path);
	else path = Path;

	path = PathUtil::UnifySeparators(path);

	char* fpath = new char[path.length() + 1];
	strcpy(fpath, path.c_str());

	char* chPtr;
	chPtr = fpath;

	bool atEnd = false;
	do
	{
		if (*chPtr == '\\' || *chPtr == '/' || *chPtr == 0)
		{
			if (*chPtr == 0) atEnd = true;

			*chPtr = 0;
			CBPlatform::CreateDirectory(fpath);
			*chPtr = '/';
		}
		chPtr++;
	} while (!atEnd);

	delete [] fpath;
}
char* CBUtils::GetFilename(char* Filename)
{
	AnsiString path = PathUtil::GetFileName(Filename);
	char* ret = new char[path.length() + 1];
	strcpy(ret, path.c_str());
	return ret;
}