Class SoFileSensor
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.sensors.SoSensor
com.openinventor.inventor.sensors.SoTimerQueueSensor
com.openinventor.inventor.sensors.SoTimerSensor
com.openinventor.inventor.sensors.SoFileSensor
Sensor that triggers a callback each time a file is changed.
File sensors trigger their callback function when a watched file changes. Files are checked at the interval specified with
SoTimerSensor.setInterval
.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add file to be monitored.void
Stop monitoring all previously registered files.Return changed file name.void
removeFile
(String filename) Remove file from monitored list.Methods inherited from class com.openinventor.inventor.sensors.SoTimerSensor
getBaseTime, getInterval, setBaseTime, setInterval
Methods inherited from class com.openinventor.inventor.sensors.SoTimerQueueSensor
getTriggerTime
Methods inherited from class com.openinventor.inventor.sensors.SoSensor
isScheduled, schedule, setTask, unschedule
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoFileSensor
public SoFileSensor()Default constructor.
-
-
Method Details
-
removeFile
Remove file from monitored list. If file is not being monitored, the method does nothing. -
clearFiles
public void clearFiles()Stop monitoring all previously registered files. -
addFile
Add file to be monitored. If file does not exist, the method does nothing. -
getFilename
Return changed file name.
Note: Only valid when called from the callback function.
-