Exemple #1
0
const std::string& FileSystem::GetCacheDir()
{
	// cache-dir versioning must not be too finegrained,
	// we do want to regenerate cache after every commit
	//
	// release builds must however also *never* use the
	// same directory as any previous development build
	// (regardless of branch), so keep caches separate
	static const std::string cacheType[2] = {"dev-", "rel-"};
	static const std::string cacheVersion = SpringVersion::GetMajor() + cacheType[SpringVersion::IsRelease()] + SpringVersion::GetBranch();
	static const std::string cacheDir = EnsurePathSepAtEnd(GetCacheBaseDir()) + cacheVersion;
	return cacheDir;
}
std::string FileSystemAbstraction::EnsurePathSepAtEnd(const std::string& path) {
	
	std::string pathCopy(path);
	EnsurePathSepAtEnd(pathCopy);
	return pathCopy;
}
std::string FileSystemHandler::EnsurePathSepAtEnd(const std::string& path) {
	
	std::string pathCopy(path);
	EnsurePathSepAtEnd(pathCopy);
	return pathCopy;
}