Hi, it would be really nice if there was a dirExists() function that worked like fileExists()

      Currently the only way to do this is to use a complicated subshell which clutters up the logs:

      def dirExists(path) {
          def exists = sh returnStdout: true, script: """path=\$(compgen -G \"${path}\") || true
              if [ ! -z \"\$path\" -a -d \"\$path\" ]; then 
                  echo true 
              else 
                  echo false 
              fi
          """
          return (exists == 'true')
      }
      

          [JENKINS-38856] BasicStep - dirExists

          Edward Easton created issue -
          Edward Easton made changes -
          Summary Original: dirExists New: BasicStep - dirExists
          Jesse Glick made changes -
          Component/s New: workflow-basic-steps-plugin [ 21712 ]
          Component/s Original: pipeline-build-step-plugin [ 21707 ]

            Unassigned Unassigned
            eeaston Edward Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: