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

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: