Options
All
  • Public
  • Public/Protected
  • All
Menu

Class File<T>

Type parameters

  • T: FileAccess

    the type of access this file has on IO

Hierarchy

  • File

Index

Constructors

Methods

Constructors

constructor

  • new File(fs: number): File

Methods

Static create

  • create<T>(path: string, content?: string | Stream, permissions?: string): T
  • Creates a new file in given path and given content

    Type parameters

    • T: FileAccess

      the type of access created file will have on IO

    Parameters

    • path: string

      absolute path of the file to create

    • Optional content: string | Stream

      content of the new file or empty file if nothing given

    • Default value permissions: string = "666"

    Returns T

    a new description of the access type the new file has

Generated using TypeDoc