Skip to content

Create PathMatchers class - Like FileMatchers but for java.nio.Path #437

@rmcdouga

Description

@rmcdouga

While not deprecated, the java.io.File class has been superceded by the java.nio.Path/java.nio.Files classes. I think more modern code would like to perform tests on Paths without having to convert them to File objects, so I think there's a need for a PathMatchers class in the io package.

I'd like to create a PR with just such a class. I just want to check that there are no objections before performing that work.

I was going to use FileMatchers class as the starting point (so all the FileMatchers methods will have corresponding Path methods making for easy transition), however I have reconsidered this and decided to create methods that more closely match the existing Path methods (e.g. hasRealPath() instead of hasCanonicalPath()). I think this approach will make the API easier to inuit in the longer term.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions