Class

org.scalajs.dom

File

Related Doc: package dom

Permalink

abstract class File extends Blob

The File interface provides information about -- and access to the contents of -- files.

These are generally retrieved from a FileList object returned as a result of a user selecting files using the input element, or from a drag and drop operation's DataTransfer object.

The file reference can be saved when the form is submitted while the user is offline, so that the data can be retrieved and uploaded when the Internet connection is restored.

Annotations
@JSType() @native() @JSGlobal()
Linear Supertypes
Blob, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. File
  2. Blob
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new File()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def arrayBuffer(): Promise[ArrayBuffer]

    Permalink

    Returns a promise that resolves with an ArrayBuffer containing the entire contents of the blob as binary data.

    Returns a promise that resolves with an ArrayBuffer containing the entire contents of the blob as binary data.

    Definition Classes
    Blob
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  15. def name: String

    Permalink

    Returns the name of the file.

    Returns the name of the file. For security reasons, the path is excluded from this property.

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  20. def size: Double

    Permalink

    The size, in bytes, of the data contained in the Blob object.

    The size, in bytes, of the data contained in the Blob object.

    Definition Classes
    Blob
  21. def slice(start: Double = js.native, end: Double = js.native, contentType: String = js.native): Blob

    Permalink

    A string indicating the MIME type of the data contained in the Blob.

    A string indicating the MIME type of the data contained in the Blob. If the type is unknown, this string is empty.

    Definition Classes
    Blob
  22. def stream(): ReadableStream[Uint8Array]

    Permalink

    Returns a ReadableStream that can be used to read the contents of the blob.

    Returns a ReadableStream that can be used to read the contents of the blob.

    Definition Classes
    Blob
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def text(): Promise[String]

    Permalink

    Returns a promise that resolves with a USVString containing the entire contents of the blob interpreted as UTF-8 text.

    Returns a promise that resolves with a USVString containing the entire contents of the blob interpreted as UTF-8 text.

    Definition Classes
    Blob
    See also

    https://developer.mozilla.org/en-US/docs/Web/API/USVString

  25. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def type: String

    Permalink

    A string indicating the MIME type of the data contained in the Blob.

    A string indicating the MIME type of the data contained in the Blob. If the type is unknown, this string is empty.

    Definition Classes
    Blob
  28. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def close(): Unit

    Permalink
    Definition Classes
    Blob
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) This method seems to have been added in error and not actually exist.

Inherited from Blob

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped