Files
test/intern/ghost/intern/GHOST_Path-api.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.5 KiB
C++
Raw Normal View History

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2010 Blender Foundation. All rights reserved. */
2011-02-25 11:28:33 +00:00
/** \file
* \ingroup GHOST
2011-02-25 11:28:33 +00:00
*/
2013-03-08 09:09:48 +00:00
#include <cstdio>
#include "GHOST_ISystemPaths.h"
#include "GHOST_Path-api.h"
#include "GHOST_Types.h"
#include "intern/GHOST_Debug.h"
GHOST_TSuccess GHOST_CreateSystemPaths(void)
{
2011-08-31 01:07:55 +00:00
return GHOST_ISystemPaths::create();
}
GHOST_TSuccess GHOST_DisposeSystemPaths(void)
{
return GHOST_ISystemPaths::dispose();
}
const char *GHOST_getSystemDir(int version, const char *versionstr)
{
2012-05-19 09:57:55 +00:00
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
return systemPaths ? systemPaths->getSystemDir(version, versionstr) : nullptr;
}
const char *GHOST_getUserDir(int version, const char *versionstr)
{
2012-05-19 09:57:55 +00:00
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
/* Shouldn't be `nullptr`. */
return systemPaths ? systemPaths->getUserDir(version, versionstr) : nullptr;
}
const char *GHOST_getUserSpecialDir(GHOST_TUserSpecialDirTypes type)
{
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
/* Shouldn't be `nullptr`. */
return systemPaths ? systemPaths->getUserSpecialDir(type) : nullptr;
}
const char *GHOST_getBinaryDir()
{
2012-05-19 09:57:55 +00:00
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
/* Shouldn't be `nullptr`. */
return systemPaths ? systemPaths->getBinaryDir() : nullptr;
2010-07-04 21:33:01 +00:00
}
2012-05-19 09:57:55 +00:00
void GHOST_addToSystemRecentFiles(const char *filename)
{
2012-05-19 09:57:55 +00:00
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
if (systemPaths) {
systemPaths->addToSystemRecentFiles(filename);
}
2011-01-05 19:19:49 +00:00
}