No. The typical /
in Path
objects is called a name separator. It is defined in the FileSystem
object from which the Path
was created.
You can retrieve it with FileSystem#getSeparator()
.
Returns the name separator, represented as a string.
The name separator is used to separate names in a path string. An
implementation may support multiple name separators in which case this
method returns an implementation specific default name separator. This
separator is used when creating path strings by invoking the
toString()
method.
In the case of the default provider, this method returns the same
separator as java.io.File.separator
.
You can retrieve a Path
's FileSystem
with Path#getFileSystem()
.
As far as I know, all typical file systems will use /
as a separator, but you could write your own FileSystem
implementation which doesn't.