java.lang.Object
com.aoindustries.aoserv.client.linux.PosixPath
- All Implemented Interfaces:
DtoFactory<PosixPath>
,Internable<PosixPath>
,Serializable
,Comparable<PosixPath>
public final class PosixPath
extends Object
implements Comparable<PosixPath>, Serializable, DtoFactory<PosixPath>, Internable<PosixPath>
Represents a full path in POSIX style. Paths must:
- Be non-null
- Be non-empty
- Start with a
/
- Not contain any null characters
- Not contain any /../ or /./ path elements
- Not end with / unless "/"
- Not end with /.. or /.
- Not contain any // in the path
TODO: This matches Path
with the exception of disallowing trailing slash except for "/".
Remove this redundancy? Subclass Path
?
- Author:
- AO Industries, Inc.
- See Also:
-
Method Details
-
validate
-
valueOf
- Parameters:
path
- whennull
, returnsnull
- Throws:
ValidationException
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<PosixPath>
-
toString
-
intern
Interns this path much in the same fashion asString.intern()
.- Specified by:
intern
in interfaceInternable<PosixPath>
- See Also:
-
getDto
- Specified by:
getDto
in interfaceDtoFactory<PosixPath>
-