Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/filesystem/compat/FileSystemFileEntry.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_FileSystemFileEntry_h
8
#define mozilla_dom_FileSystemFileEntry_h
9
10
#include "mozilla/dom/FileSystemEntry.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
class File;
16
class FileCallback;
17
class FileSystemDirectoryEntry;
18
19
class FileSystemFileEntry final : public FileSystemEntry
20
{
21
public:
22
  NS_DECL_ISUPPORTS_INHERITED
23
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileSystemFileEntry, FileSystemEntry)
24
25
  FileSystemFileEntry(nsIGlobalObject* aGlobalObject, File* aFile,
26
                      FileSystemDirectoryEntry* aParentEntry,
27
                      FileSystem* aFileSystem);
28
29
  virtual JSObject*
30
  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
31
32
  virtual bool
33
  IsFile() const override
34
0
  {
35
0
    return true;
36
0
  }
37
38
  virtual void
39
  GetName(nsAString& aName, ErrorResult& aRv) const override;
40
41
  virtual void
42
  GetFullPath(nsAString& aFullPath, ErrorResult& aRv) const override;
43
44
  void
45
  GetFile(FileCallback& aSuccessCallback,
46
          const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback) const;
47
48
private:
49
  ~FileSystemFileEntry();
50
51
  RefPtr<File> mFile;
52
};
53
54
} // namespace dom
55
} // namespace mozilla
56
57
#endif // mozilla_dom_FileSystemFileEntry_h