Options
All
  • Public
  • Public/Protected
  • All
Menu

@b4dnewz/temp

Index

Variables

Const tempDir

tempDir: string = fs.realpathSync(os.tmpdir())

Functions

dir

  • Creates a temporary directory with custom options

    Parameters

    • Optional name: string

      Optional directory name

    • Default value options: DirWriteOptions = {}

      Optional directory write options

    Returns Promise<DirAsync>

dirSync

  • Creates a temporary directory with custom options in sync mode

    Parameters

    • Optional name: string

      Optional directory name

    • Default value options: DirWriteOptions = {}

      Optional directory write options

    Returns DirSync

file

  • Creates a temporary file with custom options

    Parameters

    • Default value content: any = ""

      Optional file content

    • Default value options: FileWriteOptions = {}

      Optional file write options

    Returns Promise<FileAsync>

fileSync

  • Creates a temporary file with custom options in sync mode

    Parameters

    • Default value content: any = ""

      Optional file content

    • Default value options: FileWriteOptions = {}

      Optional file write options

    Returns FileSync

Const isUndefined

  • isUndefined(v: any): boolean
  • Parameters

    • v: any

    Returns boolean

rndString

  • rndString(len?: number): string
  • Parameters

    • Default value len: number = 10

    Returns string

tempPath

  • tempPath(__namedParameters?: object): string
  • Parameters

    • Default value __namedParameters: object = {}
      • base: any
      • name: any
      • parent: any

    Returns string

Generated using TypeDoc