|
|
|
|
WLanguage procedure called by fWatchFile WLanguage procedure ("callback") called by fWatchFile when a change is made to the watched file. This can be a local, global, or internal.
sFileName is string = "C:\Temp\MyDir\MyFile.extension"
IF fWatchFile(sFileName, fWatchFile_Callback, ...
fwCreateFile + fwModifyFile + fwDeleteFile + ...
fwRename) THEN
Info("The " + sFileName + " file will be watched.")
ELSE
Info("The " + sFileName + " file will not be watched.")
END
INTERNAL PROCEDURE fWatchFile_Callback(sFullName, sFileName, nAction, sOldFileName)
sActionDesignation is string
SWITCH nAction
CASE fwCreateFile: sActionDesignation = "Creating files"
CASE fwDeleteFile: sActionDesignation = "Deleting files"
CASE fwModifyFile: sActionDesignation = "Modifying files"
CASE fwRename: sActionDesignation = "Renaming files"
END
TableAddLine(TABLE_MODIFICATIONS, sFullName, sFileName, ...
sActionDesignation, sOldFileName)
END
Syntax
fWatchFile_Callback(<Full name of the watched file> , <Name of modified file> , <Action> , <Old file name>)
<Full name of the watched file>: Character string Full path (directory and name) of the watched file. <Name of modified file>: Character string Name of the watched file (after changes). <Action>: Integer constant Action performed on the file:
| | fwCreateFile | The <Name of modified file> file was created. | fwDeleteFile | The <Name of modified file> file was deleted. | fwModifyFile | The <Name of modified file> file was modified. | fwRename | The <Name of modified file> file was renamed. |
<Old file name>: Character string Former name of the modified file if it was renamed. Remarks Caution This WLanguage procedure is run in a WLanguage thread. Caution: The following processes cannot be run in the threads: - opening windows with WLanguage functions such as Open, Use, Close, ... A specific management mode must be implemented if some windows must be handled in threads (rare case). For more details, see Opening a window in a secondary thread.
- managing events.
- managing timers.
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|