本文整理匯總了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());
}