Daff - Data Diff

daff.TableIO

System services for the daff command-line utility.

Type: class

Constructor:

new()

Methods:

args () : Array<String>

Returns: the command-line arguments

command (cmd : String, args : Array<String>) : Int
  Execute a command.

Parameters:

  • cmd the command to execute
  • args the arguments to pass

Returns: the return value of the command

exists (path : String) : Bool
  Check if a file exists.

Parameters: path the name of the (putative) file

Returns: true if the file exists

getContent (name : String) : String
  Read a file.

Parameters: name the name of the file to read

Returns: the content of the file

hasAsync () : Bool

Returns: true if the platform has no built-in way to call a command synchronously i.e. IT IS (OLD) NODE

isTty () : Bool

Returns: true if output is a TTY. Only trustworthy if isTtyKnown() is true.

isTtyKnown () : Bool

Returns: true if we can determine whether the output is a TTY. This needs to be implemented natively, I haven’t found a call for this in Haxe.

openSqliteDatabase (path : String) : SqlDatabase
  Try to open an sqlite database.

Parameters: path to the database

Returns: opened database, or null on failure

saveContent (name : String, txt : String) : Bool
  Save a file.

Parameters:

  • name the name of the file to save
  • txt the content of the file

Returns: true on success

sendToBrowser (html : String) : Void
valid () : Bool
  Check if system services are in fact implemented.  For some
  platforms, an external implementation needs to be passed in.
writeStderr (txt : String) : Void

Parameters: txt text to write to standard error stream

writeStdout (txt : String) : Void

Parameters: txt text to write to standard output stream