Webnative uses directory and file paths built from path segments by path functions.
// creates a directory path equivalent to "public/some/directory/"constpublicDirectoryPath=wn.path.directory("public","some","directory")// creates a directory path equivalent to "private/some/directory/"constprivateDirectoryPath=wn.path.directory("private","some","directory")// creates a file path equivalent to "public/some/file"constpublicFilePath=wn.path.file("public","some","file")// creates a file path equivalent to "private/some/file"constprivateFilePath=wn.path.file("private","some","file")// wn.path.Branch.Private is an alias for "private"constprivateHelperPath=wn.path.file(wn.path.Branch.Private,"some","file")// wn.path.Branch.Public is an alias for "public"constpublicHelperPath=wn.path.file(wn.path.Branch.Public,"some","file")
All webnative SDK methods expect paths created by path functions. See the path API documentation for more path utility functions.
Path Objects. The path functions create objects like { directory: ["public", "some", "directory"] } or { file: ["public", "some", "file"] }. We recommend you use path functions because they validate paths to make sure they are well-formed.