本文整理汇总了C++中VirtualDrive::ProcessFileList方法的典型用法代码示例。如果您正苦于以下问题:C++ VirtualDrive::ProcessFileList方法的具体用法?C++ VirtualDrive::ProcessFileList怎么用?C++ VirtualDrive::ProcessFileList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VirtualDrive
的用法示例。
在下文中一共展示了VirtualDrive::ProcessFileList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LS_VirtualDrive_ProcessFileList
int LS_VirtualDrive_ProcessFileList(LuaState* state, LuaStackObject* args)
{
VirtualDrive* drive = VirtualDriveFromLua(state, args[1]);
if (args[2].IsTable())
{
VirtualDrive::FileOrderInfoArray fileOrder;
VirtualDrive::FileOrderInfo info;
LuaObject tableObj = args[2];
int index = 1;
while (true)
{
LuaObject entryNameObj = tableObj[index++];
if (!entryNameObj.IsString())
break;
info.entryName = entryNameObj.GetString();
LuaObject srcPathObj = tableObj[index++];
if (srcPathObj.IsNil())
break;
info.srcPath = srcPathObj.GetString();
info.compressionMethod = 8;
LuaObject compressionMethodObj = tableObj[index];
if (compressionMethodObj.IsNumber())
{
info.compressionMethod = compressionMethodObj.GetInteger();
index++;
}
fileOrder.Add(info);
}
bool ret = drive->ProcessFileList(fileOrder);
state->PushBoolean(ret);
if (!ret)
{
state->PushString(drive->errorString);
return 2;
}
return 1;
}
if (args[2].IsString())
{
state->PushBoolean(drive->ProcessFileList(args[2].GetString()) != 0);
return 1;
}
return 0;
}