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

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2
    • 1.3
    • Filters
    • 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. io-new-filefilters-tests.patch
          3 kB
          Niall Pemberton
        2. HiddenFileFilter.java
          2 kB
          Niall Pemberton
        3. EmptyFileFilter.java
          2 kB
          Niall Pemberton
        4. CanWriteFileFilter.java
          2 kB
          Niall Pemberton
        5. CanReadFileFilter.java
          3 kB
          Niall Pemberton

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: