예제 #1
0
파일: savefilemgr.cpp 프로젝트: 33d/scummvm
bool Ps2SaveFileManager::mcCheck(const char *path) {
	// Common::FSNode dir(Common::String(path), 1); // FIXED in gcc 3.4.x
	const Common::String str(path);
	Common::FSNode dir(str);

	// int res;

	printf("mcCheck\n");

	if (!dir.exists()) {
		printf("! exist -> create : ");
#ifdef __USE_LIBMC__
		printf("%s\n", path+4);
		// WaitSema(_sema);
		mcSync(0, NULL, NULL);
		mcMkDir(0 /*port*/, 0 /*slot*/,	path+4);
		mcSync(0, NULL, &res);
		printf("sync : %d\n", res);
		// SignalSema(_sema);
#else
		printf("%s\n", path);
		fio.mkdir(path);
#endif
	}

	// TODO: res;
	return true;
}
예제 #2
0
int McAccess::mkDir(const char *name) {
	int res;
	WaitSema(_sema);
	mcMkDir(_port, _slot, name);
	mcSync(0, NULL, &res);
	SignalSema(_sema);
	return res;
}
예제 #3
0
int mcIO::mkdir(const char *name)
{
	int rv;

#ifdef AIOMC_DEBUG
	printf("mcIO mkdir\n");
#endif

	mcMkDir(port, 0, name);
	mcSync(MC_WAIT, NULL, &rv);
	return rv;
}