コード例 #1
0
FileSystemWatcher* FileSystemWatcher::create(const char* path, Lumix::IAllocator& allocator)
{
	FileSystemWatcherPC* watcher = LUMIX_NEW(allocator, FileSystemWatcherPC)(allocator);
	if (!watcher->start(path))
	{
		LUMIX_DELETE(allocator, watcher);
		return nullptr;
	}
	return watcher;
}
コード例 #2
0
FileSystemWatcher* FileSystemWatcher::create(const QString& path)
{
	FileSystemWatcherPC* watcher = new FileSystemWatcherPC();
	TCHAR win_path[MAX_PATH];
	for (int i = 0; i < path.length(); ++i)
	{
		win_path[i] = (TCHAR)path[i].toLatin1();
	}
	win_path[path.length()] = 0;
	watcher->start(win_path);
	return watcher;
}