Commons IO
  1. Commons IO
  2. IO-275

org.apache.commons.io.FileUtils.contentEquals - Add option to ignore "line endings"

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: Utilities
    • Labels:
      None

      Description

      FileUtils has a nice member function to compare two files. It would be nice if the client had the option to ignore line endings. This way files (specifically text files) generated on different platforms (eg windows, unix) would match.

        Activity

        Hide
        Henri Yandell added a comment -

        Seems interesting - patches welcome from anyone

        Show
        Henri Yandell added a comment - Seems interesting - patches welcome from anyone
        Hide
        Sebb added a comment -

        It would be useful to include a version of IOUtils.contentEquals as well, which could operate on Reader parameters.

        Show
        Sebb added a comment - It would be useful to include a version of IOUtils.contentEquals as well, which could operate on Reader parameters.
        Hide
        Sebb added a comment -

        Fixed; adapted the existing contentEquals method to create new contentEqualsIgnoreEOL methods

        Show
        Sebb added a comment - Fixed; adapted the existing contentEquals method to create new contentEqualsIgnoreEOL methods
        Hide
        CJ Aspromgos added a comment -

        Excellent. I'll have to try out the new version.

        Show
        CJ Aspromgos added a comment - Excellent. I'll have to try out the new version.
        Hide
        Gary Gregory added a comment -

        Version 2.2 has been released and addresses this issue.

        Show
        Gary Gregory added a comment - Version 2.2 has been released and addresses this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            CJ Aspromgos
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development