nsIFileURL.idl 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsIURL.idl"
  6. interface nsIFile;
  7. /**
  8. * nsIFileURL provides access to the underlying nsIFile object corresponding to
  9. * an URL. The URL scheme need not be file:, since other local protocols may
  10. * map URLs to files (e.g., resource:).
  11. */
  12. [scriptable, uuid(e91ac988-27c2-448b-b1a1-3822e1ef1987)]
  13. interface nsIFileURL : nsIURL
  14. {
  15. /**
  16. * Get/Set nsIFile corresponding to this URL.
  17. *
  18. * - Getter returns a reference to an immutable object. Callers must clone
  19. * before attempting to modify the returned nsIFile object. NOTE: this
  20. * constraint might not be enforced at runtime, so beware!!
  21. *
  22. * - Setter clones the nsIFile object (allowing the caller to safely modify
  23. * the nsIFile object after setting it on this interface).
  24. */
  25. attribute nsIFile file;
  26. };