Dir

@JSImport("fs", "Dir") @native @JSType class Dir() extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any
class Dir

Value members

Concrete methods

def close(): Promise[Unit]

Asynchronously close the directory's underlying resource handle. Subsequent reads will result in errors.

Asynchronously close the directory's underlying resource handle. Subsequent reads will result in errors.

def close(cb: NoParamCallback): Unit
def closeSync(): Unit

Synchronously close the directory's underlying resource handle. Subsequent reads will result in errors.

Synchronously close the directory's underlying resource handle. Subsequent reads will result in errors.

def read(): Promise[Dirent | Null]

Asynchronously read the next directory entry via readdir(3) as an Dirent. After the read is completed, a value is returned that will be resolved with an Dirent, or null if there are no more directory entries to read. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.

Asynchronously read the next directory entry via readdir(3) as an Dirent. After the read is completed, a value is returned that will be resolved with an Dirent, or null if there are no more directory entries to read. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.

def read(cb: Function2[ErrnoException | Null, Dirent | Null, Unit]): Unit
def readSync(): Dirent | Null

Synchronously read the next directory entry via readdir(3) as a Dirent. If there are no more directory entries to read, null will be returned. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.

Synchronously read the next directory entry via readdir(3) as a Dirent. If there are no more directory entries to read, null will be returned. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

val path: String