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

Add null-safe org.apache.commons.vfs2.util.FileObjectUtils.exists(FileObject)

    XMLWordPrintableJSON

    Details

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

      Description

      Add null-safe org.apache.commons.vfs2.util.FileObjectUtils.exists(FileObject):

          /**
           * Null-safe call to {@link FileObject#exists()}.
           * 
           * @param fileObject
           * @return false if {@code fileObject} is null, otherwise, see {@link FileObject#exists()}.
           * @throws FileSystemException On error determining if this file exists.
           */
          public static boolean exists(final FileObject fileObject) throws FileSystemException {
              return fileObject != null && fileObject.exists();
          }
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: