Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileSystem

Hierarchy

  • FileSystem

Index

Methods

Static allocateRw

  • allocateRw(size: number): NativePointer
  • Allocate the given size in the heap

    Parameters

    • size: number

    Returns NativePointer

Static allocateString

  • allocateString(what: string): NativePointer
  • Allocate and write the given string in the heap

    Parameters

    • what: string

    Returns NativePointer

Static fopen

  • fopen(filePath: string, perm: string): NativeReturnValue
  • Call native fopen with filePath and perm

    Parameters

    • filePath: string
    • perm: string

    Returns NativeReturnValue

Static init

  • init(): void

Static popen

  • popen(filePath: string, perm: string): NativeReturnValue
  • Call native popen with filePath and perm

    Parameters

    • filePath: string
    • perm: string

    Returns NativeReturnValue

Static readStringFromFile

  • readStringFromFile(filePath: string): string
  • Read a file as string

    Parameters

    • filePath: string

    Returns string

Static readStringFromFp

  • readStringFromFp(fp: NativePointer): string
  • Read string from descriptor

    Parameters

    • fp: NativePointer

    Returns string

Static writeStringToFile

  • writeStringToFile(filePath: string, content: string, append: boolean): void
  • Write string to file

    Parameters

    • filePath: string
    • content: string
    • append: boolean

    Returns void