summaryrefslogtreecommitdiff
path: root/Runtime/FileSystem/FileJobs.h
blob: 2e53a39826c88fa714b9e816fbcf05aa9c740075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <vector>
#include "Runtime/Threading/Job.h"
#include "Runtime/Lua/LuaHelper.h"
#include "Runtime/Threading/JobSystem.h"

class ReadFilesJob : public Job
{
public:
	ReadFilesJob(LuaBind::VM* vm) : callback(vm), cur(0) {}
	~ReadFilesJob() {}

	void Dispacth(void* param) override;
	void Process() override;
	bool IsFinished() override;

	int cur = 0; //当前处理的文件
	std::vector<std::string> files; // 文件路径
	LuaBind::StrongRef callback; // 完成后的回调函数

};