summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.h
blob: 3dfc770d4b0a5e20ddef4c4061fd87e2d3d487cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_FILESYSTEM_FILE_SYSTEM_DIRECTORY_HANDLE_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_FILESYSTEM_FILE_SYSTEM_DIRECTORY_HANDLE_H_

#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/modules/filesystem/file_system_base_handle.h"
#include "third_party/blink/renderer/modules/filesystem/file_system_get_directory_options.h"
#include "third_party/blink/renderer/modules/filesystem/file_system_get_file_options.h"
#include "third_party/blink/renderer/modules/filesystem/get_system_directory_options.h"

namespace blink {

class FileSystemDirectoryHandle : public FileSystemBaseHandle {
  DEFINE_WRAPPERTYPEINFO();

 public:
  FileSystemDirectoryHandle(DOMFileSystemBase*, const String& full_path);

  bool isDirectory() const override { return true; }
  ScriptPromise getFile(ScriptState*,
                        const String& name,
                        const FileSystemGetFileOptions&);
  ScriptPromise getDirectory(ScriptState*,
                             const String& name,
                             const FileSystemGetDirectoryOptions&);
  ScriptValue getEntries(ScriptState*);
  ScriptPromise removeRecursively(ScriptState*);

  static ScriptPromise getSystemDirectory(
      ScriptState*,
      const GetSystemDirectoryOptions& options);
};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_FILESYSTEM_FILE_SYSTEM_DIRECTORY_HANDLE_H_