Exemple #1
0
void PakReader::removeFile(const res::path & file) {
	
	PakDirectory * dir = getDirectory(file.parent());
	if(dir) {
		dir->removeFile(file.filename());
	}
}
Exemple #2
0
bool PakReader::addFiles(const fs::path & path, const res::path & mount) {
	
	if(fs::is_directory(path)) {
			
		bool ret = addFiles(addDirectory(mount), path);
	
		if(ret) {
			LogInfo << "Added dir " << path;
		}
		
		return ret;
		
	} else if(fs::is_regular_file(path) && !mount.empty()) {
		
		PakDirectory * dir = addDirectory(mount.parent());
		
		return addFile(dir, path, mount.filename());
		
	}
	
	return false;
}
Exemple #3
0
EntityId::EntityId(const res::path & classPath, EntityInstance instance)
	: m_className(classPath.filename())
	, m_instance(instance)
{ }