The following example shows how to build the FileOnOff agent without writing and compiling any C++ code. This example implements the online, offline, and monitor entry points only.
Example: implementing entry points without C++
C:\> md %VCS_HOME%\bin\FileOnOff
Copy the file to %VCS_HOME%\bin\FileOnOff.dll, as shown below:
C:\> copy %VCS_HOME%\bin\VCSdefault.dll
%VCS_HOME%\bin\FileOnOff\FileOnOff.dll
online
, offline
, and monitor
entry points using scripts. The examples below use shell scripts. MKS Toolkit or equivalent software is required for running shell scripts. Entry points can also be implemented as batch files.
# Create the file specified by the PathName
# Remove the file specified by the PathName
# Verify that file specified by PathName
Additionally, you can implement the info
and action
entry points. For the action entry point, create a subdirectory named "actions" under the agent directory, and create scripts with the same names as the action_tokens within the subdirectory.