Array Server Virtual Path

From Array Suite Wiki

Jump to: navigation, search

Virtual path is the relative path on OmicSoft Server based on mapped folders defined in ArrayServer.cfg file.

For example, if server admin mapped MyFolderAlias=/mnt/Data/MyData on OmicSoft Server, the virtual path of tmp.txt file in MyData folder would be /MyFolderAlias/tmp.txt. Cloud folders can also be mapped. For example, if the admin mapped MyCloudFolderAlias=east.test.mycloud/MyData, the virtual path of tmp.txt in the MyData folder would be /MyCloudFolderAlias/tmp.txt.

Rules for converting between virtual path and real physical path in scripts.

  1. In most contexts, when executing a script on an OmicSoft Server, path values in the script are expected to be Virtual paths and interpreted as such
    • /MyFolderAlias/tmp.txt will be interpreted as a Virtual Path, converted to /mnt/Data/MyData/tmp.txt to find the correct file.
    • /mnt/Data/MyData/tmp.txt will also be interpreted as a virtual path, which doesn't exist, so an error will be thrown.
  2. If you need to explicitly label a path as a physical path, use $$. "$$path" will be automatically converted to "path".
    • $$/mnt/Data/MyData/tmp.txt will be interpreted as a physical path.
    • $$/MyFolderAlias/tmp.txt will fail, because MyFolderAlias is a virtual path.
  3. If you need to explicitly label an AWS S3 Cloud-based path, use %%.
    •  %%/east.test.mycloud/MyData/tmp.txt will be interpreted as a physical S3 bucket path, not a virtual cloud folder.
  4. If you need to explicitly label a path as a virtual path, use @@.
    • There are some rare contexts where a path value is expected to be a physical path on the OmicSoft Server host and /MyFolderAlias/tmp.txt would fail to be found
    • @@/MyFolderAlias/tmp.txt will be interpreted as a virtual path and converted to /mnt/Data/MyData/tmp.txt to find the correct file
      • In some contexts, this won't work as only physical paths are supported in which case, you could consider using the FetchMappedFolderList (or FetchMappedCloudFolderList) ShortCommands to retrieve the virtual folder mapping details and decode your target virtual path back to its corresponding physical path.
  5. If a path value starts with “\\”, it will be interpreted as real physical UNC path
  6. For Windows OmicSoft Server hosts, if a path value contains ":\" (e.g. D:\Data\MyData ), it will be interpreted as a physical path on the OmicSoft Server host