本文整理汇总了C++中DirectoryEntry::removeRecursively方法的典型用法代码示例。如果您正苦于以下问题:C++ DirectoryEntry::removeRecursively方法的具体用法?C++ DirectoryEntry::removeRecursively怎么用?C++ DirectoryEntry::removeRecursively使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DirectoryEntry
的用法示例。
在下文中一共展示了DirectoryEntry::removeRecursively方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsDirectoryEntryPrototypeFunctionRemoveRecursively
EncodedJSValue JSC_HOST_CALL jsDirectoryEntryPrototypeFunctionRemoveRecursively(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSDirectoryEntry::s_info))
return throwVMTypeError(exec);
JSDirectoryEntry* castedThis = static_cast<JSDirectoryEntry*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSDirectoryEntry::s_info);
DirectoryEntry* imp = static_cast<DirectoryEntry*>(castedThis->impl());
RefPtr<VoidCallback> successCallback;
if (exec->argumentCount() > 0 && !exec->argument(0).isNull() && !exec->argument(0).isUndefined()) {
if (!exec->argument(0).isObject()) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return JSValue::encode(jsUndefined());
}
successCallback = JSCustomVoidCallback::create(asObject(exec->argument(0)), castedThis->globalObject());
}
RefPtr<ErrorCallback> errorCallback;
if (exec->argumentCount() > 1 && !exec->argument(1).isNull() && !exec->argument(1).isUndefined()) {
if (!exec->argument(1).isObject()) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return JSValue::encode(jsUndefined());
}
errorCallback = JSErrorCallback::create(asObject(exec->argument(1)), castedThis->globalObject());
}
imp->removeRecursively(successCallback, errorCallback);
return JSValue::encode(jsUndefined());
}