FileWatchAddΒΆ

FileWatchAdd adds a file to the list of watched files. If the operating system detects a change to the file the callback function is called.

bool = FileWatchAdd(ssFileName, ssCallback)
bool = FileWatchAdd(ssFileName, ssCallback, rsData)

Return Value

bool is TRUE, if the file could be added to the list of watched files.

Parameters

ssFileName

Complete file name.

ssCallback

Name of a callback function which will be called if the file has been modified. The callback function must be specified by the user. The callback function has one parameter, the complete filename of the watched file.

rsData

A scalar number.

Example

FileWatchAdd("c:/test.txt", "MyReloadFunction");

def MyReloadFunction(ssFile)
{
    // Do something with the file
    ....
}

Example

FileWatchAdd("c:/test.txt", "MyReloadFunction", 123);

def MyReloadFunction(ssFile, rsData)
{
    // Do something with the file
    ....
}

History

Version Description
R2013.1 New parameter rsData.
3.2.1 New.

id-679831