Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-85

IOFileFilter implementations for File.canRead(), File.canWrite(), File.isHidden() and empty files/directories

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: Filters
    • Labels:
      None

      Description

      I have the following additional IOFileFilter implementations:

      1) CanReadFileFilter checks File.canRead()
      2) CanWriteFileFilter checks File.canWrite()
      3) HiddenFileFilter checks File.isHidden()
      4) EmptyFileFilter checks either File contents are empty or directories contain no files

      I've been messing around with Commons Finder without realizing the support that already exists in IO for FileFilters

      I also have a DepthFileFilter that checks a maximum depth from a reference file thats useful for limiting navigating a directory structure, if that sounds useful.

        Attachments

        1. EmptyFileFilter.java
          2 kB
          Niall Pemberton
        2. io-new-filefilters-tests.patch
          3 kB
          Niall Pemberton
        3. CanReadFileFilter.java
          3 kB
          Niall Pemberton
        4. CanWriteFileFilter.java
          2 kB
          Niall Pemberton
        5. HiddenFileFilter.java
          2 kB
          Niall Pemberton

          Activity

            People

            • Assignee:
              niallp Niall Pemberton
              Reporter:
              niallp Niall Pemberton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: