Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TextStream

Hierarchy

  • TextStream

Index

Constructors

Constructors

constructor

  • Creates a textStream.

    // The file does not have to exist
    var myStream = new TextStream( 'PROJECT/my-streamed-file.js', 'write' );
    // Creates the file if it does not exist
    myStream.write( 'Hello '+ Date.now() +' !\n' );
    // Important to close the stream every time.
    myStream.close();

    Parameters

    • file: String

      Binary text file to reference. The file does not to exist

    • mode: String

      Opens a stream in Write, Read or Overwrite mode

    • Optional charset: Number

      (default: 7) Character set of the text. See more details on charset

    Returns WAKTextStreamInstance

  • Creates a textStream.

    // The file does not have to exist
    var myFile = new File( 'PROJECT/my-streamed-file.js' );
    var myStream = new TextStream( file, 'write' );
    // Creates the file if it does not exist
    myStream.write( 'Hello '+ Date.now() +' !\n' );
    // Important to close the stream every time.
    myStream.close();

    Parameters

    • file: WAKFileInstance

      Binary text file to reference. The file does not to exist

    • mode: String

      Opens a stream in Write, Read or Overwrite mode

    • Optional charset: Number

      (default: 7) Character set of the text. See more details on charset

    Returns WAKTextStreamInstance