Class LogicalPathConstraints

java.lang.Object
io.ocfl.core.path.constraint.LogicalPathConstraints

public final class LogicalPathConstraints extends Object
Describes the constraints that are applied to logical paths.
  • Method Details

    • constraints

      public static PathConstraintProcessor constraints()
      Logical paths may not:
      • Begin or end with a '/'
      • Contain empty filenames
      • Contain the filenames '.' or '..'
      Returns:
      logical path constraints
    • constraintsWithBackslashCheck

      public static PathConstraintProcessor constraintsWithBackslashCheck()
      Logical paths may not:
      • Begin or end with a '/'
      • Contain empty filenames
      • Contain the filenames '.' or '..'
      • Use backslashes as path separators

      This backslash constraint is not a spec constraint, but is in some cases necessary to enforce when running on Windows.

      Returns:
      logical path constraints