tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

FileSystemRootDirectoryEntry.h (1798B)


      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_FileSystemRootDirectoryEntry_h
      8 #define mozilla_dom_FileSystemRootDirectoryEntry_h
      9 
     10 #include "mozilla/dom/FileSystemDirectoryEntry.h"
     11 
     12 namespace mozilla::dom {
     13 
     14 class FileSystemRootDirectoryEntry final : public FileSystemDirectoryEntry {
     15 public:
     16  NS_DECL_ISUPPORTS_INHERITED
     17  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileSystemRootDirectoryEntry,
     18                                           FileSystemDirectoryEntry)
     19 
     20  FileSystemRootDirectoryEntry(nsIGlobalObject* aGlobalObject,
     21                               Sequence<RefPtr<FileSystemEntry>> aEntries,
     22                               FileSystem* aFileSystem);
     23 
     24  virtual void GetName(nsAString& aName, ErrorResult& aRv) const override;
     25 
     26  virtual void GetFullPath(nsAString& aFullPath,
     27                           ErrorResult& aRv) const override;
     28 
     29  virtual already_AddRefed<FileSystemDirectoryReader> CreateReader() override;
     30 
     31 private:
     32  ~FileSystemRootDirectoryEntry();
     33 
     34  virtual void GetInternal(
     35      const nsAString& aPath, const FileSystemFlags& aFlag,
     36      const Optional<OwningNonNull<FileSystemEntryCallback>>& aSuccessCallback,
     37      const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback,
     38      GetInternalType aType) override;
     39 
     40  void Error(const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback,
     41             nsresult aError) const;
     42 
     43  Sequence<RefPtr<FileSystemEntry>> mEntries;
     44 };
     45 
     46 }  // namespace mozilla::dom
     47 
     48 #endif  // mozilla_dom_FileSystemRootDirectoryEntry_h