The ObjectStore (NS4) “file system”
By design, ObjectStore (NS4) does not operate like a traditional “file system” in regards to directory structure and file naming. Rather than standard directories and subdirectories comprised of file contents, a database storage model is incorporated, in which the following apply.
- Forward slashes (“/”) can exist as both a path separator and an object-naming character. For example, your directory and file names can end in one or more trailing slashes.
- Single or double “dot-files” can be used as a path element. For example, “/.” or “/..” can be included as file names or sub-directories in a path)
With this in mind, it is important to note the following formula:
object name = directory + "/" + filename
Everything before the last “/” is considered the directory name; everything after the last “/” is considered a file name or subsequent directory.
For example, along a path of “
/<CP Code>/..///newLink/”, “
..//” would be a subdirectory name,
newLink/” could be a
symlink contained therein.
Caveats and recommendations
- You can only use a dot character (".") in a path when using the NetStorage Usage API to manage your content. You cannot use a dot character in a path when using any of the standard protocols supported for use with ObjectStore (NS4) (SSH, FTP, etc.).
- We recommend against using these characters for uploads. While they are supported for use in an ObjectStore (NS4) path, it's best that you don't upload files using repeated slashes, trailing slashes, and path components comprised of only a single dot (".") or two dots (".."). Browsers are known to have trouble accessing these paths. This has also been known to create issues when incorporating protocols such as FTP and SFTP.