setFiles

(re)sets the complete file list with a new array

Syntax

setFiles(files)

Returns

returns (integer) true if successful

Parameters

files (object)
array with file objects

Usage

Example array

[
  {
    "idpath": "C:\\file.txt:0",
    "path": "C:\\file.txt",
    "index": 0
  },
  {
    "idpath": "C:\\file.txt:1",
    "path": "C:\\file.txt",
    "index": 1
  },
  {
    "path": "C:\\other_file.txt"
  }
]

When adding files to an array, in the most basic case you can add objects with just a "path" value.

As the "path" is mandatory and "index" is only needed if the value is non-zero.

The "idpath" is optional, as it will be created from "path" and "index".

Note that each object in the array can contain more custom values, other than these above.