|
|
|
|
|
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.
sNomFichier is string = "C:\Temp\MonRep\MonFichier.extension"
IF fWatchFile(sNomFichier, fSurveilleFichier_Callback, ...
fwCreateFile + fwModifyFile + fwDeleteFile + ...
fwRename) THEN
Info("La mise sous surveillance du fichier " + sNomFichier + " a réussi.")
ELSE
Info("La mise sous surveillance du fichier " + sNomFichier + " a échoué.")
END
INTERNAL PROCEDURE fSurveilleFichier_Callback(sNomComplet, sNomFichierSurveille, nAction, sAncienNomFichier)
sDesignationAction is string
SWITCH nAction
CASE fwCreateFile: sDesignationAction = "Création de fichier"
CASE fwDeleteFile: sDesignationAction = "Suppression de fichier"
CASE fwModifyFile: sDesignationAction = "Modification de fichier"
CASE fwRename: sDesignationAction = "Renommage de fichier"
END
TableAddLine(TABLE_MODIFICATIONS, sNomComplet, sNomFichierSurveille, ...
sDesignationAction, sAncienNomFichier)
END
Sintaxis
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. Observaciones Caution This WLanguage procedure is run in a WLanguage thread. Please note: the following processes cannot be run in threads: - opening windows with WLanguage functions such as Open, Use, Close, ... If windows are to be handled in threads (a rare case), a specific management system must be set up. For more details, see Opening a window in a secondary thread.
- managing events.
- managing timers.
Clasificación Lógica de negocio / UI: Código neutro
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|