This source file includes following definitions.
- createReader
- getFile
- getDirectory
- removeRecursively
- trace
#include "config.h"
#include "modules/filesystem/DirectoryEntrySync.h"
#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "modules/filesystem/DirectoryReaderSync.h"
#include "modules/filesystem/FileEntrySync.h"
#include "modules/filesystem/SyncCallbackHelper.h"
namespace WebCore {
DirectoryEntrySync::DirectoryEntrySync(PassRefPtrWillBeRawPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
: EntrySync(fileSystem, fullPath)
{
ScriptWrappable::init(this);
}
PassRefPtrWillBeRawPtr<DirectoryReaderSync> DirectoryEntrySync::createReader()
{
return DirectoryReaderSync::create(m_fileSystem, m_fullPath);
}
PassRefPtrWillBeRawPtr<FileEntrySync> DirectoryEntrySync::getFile(const String& path, const Dictionary& options, ExceptionState& exceptionState)
{
FileSystemFlags flags(options);
RefPtr<EntrySyncCallbackHelper> helper = EntrySyncCallbackHelper::create();
m_fileSystem->getFile(this, path, flags, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
return static_pointer_cast<FileEntrySync>(helper->getResult(exceptionState));
}
PassRefPtrWillBeRawPtr<DirectoryEntrySync> DirectoryEntrySync::getDirectory(const String& path, const Dictionary& options, ExceptionState& exceptionState)
{
FileSystemFlags flags(options);
RefPtr<EntrySyncCallbackHelper> helper = EntrySyncCallbackHelper::create();
m_fileSystem->getDirectory(this, path, flags, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
return static_pointer_cast<DirectoryEntrySync>(helper->getResult(exceptionState));
}
void DirectoryEntrySync::removeRecursively(ExceptionState& exceptionState)
{
RefPtr<VoidSyncCallbackHelper> helper = VoidSyncCallbackHelper::create();
m_fileSystem->removeRecursively(this, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
helper->getResult(exceptionState);
}
void DirectoryEntrySync::trace(Visitor* visitor)
{
EntrySync::trace(visitor);
}
}