Ejemplo n.º 1
0
const String & FileSystem::SystemPathForFrameworkPath(const String & frameworkPath)
{
	//DVASSERT(frameworkPath.size() > 0);
	if(frameworkPath[0] != '~')
	{
		return frameworkPath;
	}
	tempRetPath = frameworkPath;
	size_t find = tempRetPath.find("~res:");

	if(find != tempRetPath.npos)
	{
		tempRetPath = tempRetPath.erase(0, 5);
		tempRetPath = FilepathRelativeToBundle("") + tempRetPath;
	}
	else
	{
		find = tempRetPath.find("~doc:");
		if(find != tempRetPath.npos)
		{
			tempRetPath = tempRetPath.erase(0, 5);
			tempRetPath = FilepathInDocuments("") + tempRetPath;
		}
	}
    
    tempRetPath = NormalizePath(tempRetPath);
	return tempRetPath;
}
Ejemplo n.º 2
0
String FilePath::GetSystemPathname(const String &pathname, const ePathType pType)
{
    if(pType == PATH_IN_FILESYSTEM || pType == PATH_IN_MEMORY)
        return pathname;
    
    String retPath = pathname;
	if(pType == PATH_IN_RESOURCES)
	{
		retPath = FilePath(retPath).GetAbsolutePathname();
	}
	else if(pType == PATH_IN_DOCUMENTS)
	{
        retPath = retPath.erase(0, 5);
        retPath = FilepathInDocuments(retPath).GetAbsolutePathname();
	}
    
    return NormalizePathname(retPath);
}
Ejemplo n.º 3
0
FilePath FilePath::FilepathInDocuments(const String & relativePathname)
{
    return FilepathInDocuments(relativePathname.c_str());
}