Bug 454959 - Add extra constructor to Path class

Add Path.forPosix() and Path.forWindows() static factory methods where
the platform is fixed instead of being dependent on the local platform.
This can be used to manipulate paths representing locations in a remote
file system regardless of the local platform's file system.

Make isValidPath(String) and isValidSegment(String) dependent on the
path instance's platform.

Add isValidPosixPath(), isValidWindowsPath(), isValidPosixSegment() and
isValidWindowsSegment() static methods to test paths and segments for a
specific platform.

Change-Id: I5479d7268fc224abbbe9512288ceae8bc50cb77c
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
2 files changed