Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-367

Add APIs FileObject isFile(), FileObject isFolder(), and FileName isFile()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0, 2.0
    • Fix Version/s: 2.1
    • Labels:
      None
    • Environment:

      Description

      As a call site, I want to say fileObject.isFile(), not FileType.FILE.equals(fileObject.getType()) or fileObject.getType() == FileType.FILE

      It turns out this equals()/== pattern is repeated internally quit a bit. Refactor that to use the new API.

      Same idea for FileName isFile (but there are fewer call sites to refactor.)

        Attachments

          Activity

            People

            • Assignee:
              ggregory Gary Gregory
              Reporter:
              ggregory Gary Gregory
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: