trait FileHandle extends Object with StObject with _TransferListItem
- Annotations
- @JSType() @native()
- Source
- fsPromisesMod.scala
- Alphabetic
- By Inheritance
- FileHandle
- _TransferListItem
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def appendFile(data: Uint8Array, options: BufferEncoding): Promise[Unit]
- def appendFile(data: Uint8Array, options: BaseEncodingOptionsmodeMoEncoding): Promise[Unit]
- def appendFile(data: Uint8Array): Promise[Unit]
- def appendFile(data: java.lang.String, options: BufferEncoding): Promise[Unit]
- def appendFile(data: java.lang.String, options: BaseEncodingOptionsmodeMoEncoding): Promise[Unit]
- def appendFile(data: java.lang.String): Promise[Unit]
Asynchronously append data to a file, creating the file if it does not exist.
Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically. The
FileHandlemust have been opened for appending.- data
The data to write. If something other than a
BufferorUint8Arrayis provided, the value is coerced to a string.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def chmod(mode: Mode): Promise[Unit]
Asynchronous fchmod(2) - Change permissions of a file.
Asynchronous fchmod(2) - Change permissions of a file.
- mode
A file mode. If a string is passed, it is parsed as an octal integer.
- def chown(uid: Double, gid: Double): Promise[Unit]
Asynchronous fchown(2) - Change ownership of a file.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def close(): Promise[Unit]
Asynchronous close(2) - close a
FileHandle. - def datasync(): Promise[Unit]
Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- val fd: Double
Gets the file descriptor for this file handle.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasOwnProperty(v: scala.Predef.String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def propertyIsEnumerable(v: scala.Predef.String): Boolean
- Definition Classes
- Object
- def read[TBuffer](buffer: TBuffer, offset: Unit, length: Unit, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Unit, length: Null, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Unit, length: Double, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Unit, length: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Null, length: Unit, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Null, length: Null, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Null, length: Double, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Null, length: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Double, length: Unit, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Double, length: Null, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Double, length: Double, position: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Double, length: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer, offset: Double): Promise[Buffer[TBuffer]]
- def read[TBuffer](buffer: TBuffer): Promise[Buffer[TBuffer]]
Asynchronously reads data from the file.
Asynchronously reads data from the file. The
FileHandlemust have been opened for reading.- buffer
The buffer that the data will be written to.
- def readFile(options: BufferEncoding): Promise[java.lang.String]
- def readFile(options: 3): Promise[Buffer]
- def readFile(options: EncodingBufferEncoding): Promise[java.lang.String]
Asynchronously reads the entire contents of a file.
Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. The
FileHandlemust have been opened for reading.- options
An object that may contain an optional flag. If a flag is not provided, it defaults to
'r'.
- def readFile(options: BaseEncodingOptionsflagOp): Promise[|[java.lang.String, Buffer]]
- def readFile(): Promise[Buffer]
Asynchronously reads the entire contents of a file.
Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. The
FileHandlemust have been opened for reading. - def readv(buffers: Array[ArrayBufferView], position: Double): Promise[ReadVResult]
- def readv(buffers: Array[ArrayBufferView]): Promise[ReadVResult]
See
fs.readvpromisified version. - def stat(opts: StatOptions): Promise[|[Stats, BigIntStats]]
- def stat(opts: StatOptionsbiginttrue): Promise[BigIntStats]
- def stat(opts: StatOptionsbigintfalseund): Promise[Stats]
- def stat(): Promise[Stats]
Asynchronous fstat(2) - Get file status.
- def sync(): Promise[Unit]
Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): scala.Predef.String
- Definition Classes
- Object
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- def truncate(len: Double): Promise[Unit]
- def truncate(): Promise[Unit]
Asynchronous ftruncate(2) - Truncate a file to a specified length.
- def utimes(atime: Double, mtime: Double): Promise[Unit]
- def utimes(atime: Double, mtime: Date): Promise[Unit]
- def utimes(atime: Double, mtime: java.lang.String): Promise[Unit]
- def utimes(atime: Date, mtime: Double): Promise[Unit]
- def utimes(atime: Date, mtime: Date): Promise[Unit]
- def utimes(atime: Date, mtime: java.lang.String): Promise[Unit]
- def utimes(atime: java.lang.String, mtime: Double): Promise[Unit]
- def utimes(atime: java.lang.String, mtime: Date): Promise[Unit]
- def utimes(atime: java.lang.String, mtime: java.lang.String): Promise[Unit]
Asynchronously change file timestamps of the file.
Asynchronously change file timestamps of the file.
- atime
The last access time. If a string is provided, it will be coerced to number.
- mtime
The last modified time. If a string is provided, it will be coerced to number.
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def write[TBuffer](buffer: TBuffer, offset: Unit, length: Unit, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Unit, length: Null, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Unit, length: Double, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Unit, length: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Null, length: Unit, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Null, length: Null, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Null, length: Double, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Null, length: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Double, length: Unit, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Double, length: Null, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Double, length: Double, position: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Double, length: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer, offset: Double): Promise[BytesWritten[TBuffer]]
- def write[TBuffer](buffer: TBuffer): Promise[BytesWritten[TBuffer]]
Asynchronously writes
bufferto the file.Asynchronously writes
bufferto the file. TheFileHandlemust have been opened for writing.- buffer
The buffer that the data will be written to.
- def write(data: Uint8Array, position: Unit, encoding: BufferEncoding): Promise[BufferBytesWritten]
- def write(data: Uint8Array, position: Null, encoding: BufferEncoding): Promise[BufferBytesWritten]
- def write(data: Uint8Array, position: Double, encoding: BufferEncoding): Promise[BufferBytesWritten]
- def write(data: Uint8Array, position: Double): Promise[BufferBytesWritten]
- def write(data: Uint8Array): Promise[BufferBytesWritten]
- def write(data: java.lang.String, position: Unit, encoding: BufferEncoding): Promise[BufferBytesWritten]
- def write(data: java.lang.String, position: Null, encoding: BufferEncoding): Promise[BufferBytesWritten]
- def write(data: java.lang.String, position: Double, encoding: BufferEncoding): Promise[BufferBytesWritten]
- def write(data: java.lang.String, position: Double): Promise[BufferBytesWritten]
- def write(data: java.lang.String): Promise[BufferBytesWritten]
Asynchronously writes
stringto the file.Asynchronously writes
stringto the file. TheFileHandlemust have been opened for writing. It is unsafe to callwrite()multiple times on the same file without waiting for thePromiseto be resolved (or rejected). For this scenario,fs.createWriteStreamis strongly recommended. - def writeFile(data: Uint8Array, options: BufferEncoding): Promise[Unit]
- def writeFile(data: Uint8Array, options: BaseEncodingOptionsmodeMo): Promise[Unit]
- def writeFile(data: Uint8Array): Promise[Unit]
- def writeFile(data: java.lang.String, options: BufferEncoding): Promise[Unit]
- def writeFile(data: java.lang.String, options: BaseEncodingOptionsmodeMo): Promise[Unit]
- def writeFile(data: java.lang.String): Promise[Unit]
Asynchronously writes data to a file, replacing the file if it already exists.
Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically. The
FileHandlemust have been opened for writing. It is unsafe to callwriteFile()multiple times on the same file without waiting for thePromiseto be resolved (or rejected).- data
The data to write. If something other than a
BufferorUint8Arrayis provided, the value is coerced to a string.
- def writev(buffers: Array[ArrayBufferView], position: Double): Promise[WriteVResult]
- def writev(buffers: Array[ArrayBufferView]): Promise[WriteVResult]
See
fs.writevpromisified version.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated