Skip to main content

File and Folder Mapping

The file and folder mapping feature in OPC UA OmniEdge allows you to map existing FolderType and FileType Nodes in the OPC UA address space to files and folders on the local filesystem. This enables you to expose files and folders as part of your OPC UA server, allowing clients to access their content directly.

The file and folder mapping allows you to map FoleType and FileDirectoryType Node in the OPC UA address space to files and folders on the local filesystem.

example configuration

   - node: na=own;s=MyFolder
folder: ${TMP}/MyFolder

- node: na=own;s=MyFile
file: ${TMP}/MyFile.txt

Configuration Options

  • node: The NodeId of an existing FolderType or FileDirectoryType Node in the OPC UA address space. This could be a browse path or a full NodeId.

  • folder: The path to the folder on the local filesystem that corresponds to the FileDirectoryType Node.

  • This can be an absolute or relative path to the configuration file.

  • If the folder does not exist, it will be created automatically.

  • If the folder is a relative path, it will be resolved relative to the configuration file location.

  • If the folder is an absolute path, it will be used as is.

  • The mapping will fail if the node doesn't exist in the OPC UA address space or is not of a FileDirectoryType.

  • file: The path to the file on the local filesystem that corresponds to the FileType Node.

    • This can be an absolute or relative path or relative to the configuration file.
    • The file doesn't need to exist, it will be created automatically by the OPCUA commands or by your application.
    • If the file changes, teh OPCUA server will automatically update the FileType Node in the address space.
    • The mapping will fail if the node doesn't exist in the OPC UA address space or is not of a FielType.
  • the filename can contains environment variables, which will be resolved at runtime.

    • For example, ${TMP} will be replaced with the value of the TMP environment variable.
    • If the environment variable is not set, it will be replaced with an empty string.
tip

Security To prevent malicious user to overflow the filesystem, you are advice to make your files and folders point to a dedicated fixed size file system so it cannot grow indefinitely and does'nt interfere with the system files