Directory paths and protocols

CAA.FILENAME which is described in “CAA_Types.library“ should be usable for library “CAA_File“ in the following way. Separators between directory paths in "CAA.FILENAME“ are the slash („/“) or the back-slash („\“). The interpretation of the directory path is tolerant to the effect that either one or the other of these characters can be used.

Mixed usage should be avoided by an error message. The part of a “CAA.FILENAME“ character string behind the last separator is the file name. The rest specifies the directory path. Only in the first part of the directory path may a series of colons be used for the specification of drive letters or for device identification. The function block FILE.SetRoot provides for an enhanced portability of the applications, regardless of the many different options available to display a directory path. The starting point within the directory tree can thus be set centrally and it is then possible to navigate through the application relative to this starting point.

 

  • Absolute paths in the local file system:  C:/dir/Test.txt or /ram:2/home/Test.txt
  • Relative paths in the local file system:  ../Log/Test.txt' or 'Log/Test.txt
  • Complete path specification for a file in the local files system:  file://C:/dir/Test.txt
  • Complete path specification for a file on a FTP Server:  ftp://<user>:<passwd>@<ip-addr>[:<port>]/home/user/Test.txt
  • Complete path specification for a file on a HTTP Server:  http://<ip-addr>[:<port>]/dir/Test.txt 

Whether the appropriate resolver functions for FTP- or HTTP- Servers are available in the corresponding implementation, can be evaluated via function FILE.GetProperty. Only IP addresses are valid, the resolution of a name is not intended for in the functional scope of the library “CAA.File”.