    # File lib/chef/provider/deploy.rb, line 414
          def create_dir_unless_exists(dir)
            if ::File.directory?(dir)
              Chef::Log.debug "#{@new_resource} not creating #{dir} because it already exists"
              return false
            end
            converge_by("create new directory #{dir}") do
              begin
                FileUtils.mkdir_p(dir)
                Chef::Log.debug "#{@new_resource} created directory #{dir}"
                if @new_resource.user
                  FileUtils.chown(@new_resource.user, nil, dir)
                  Chef::Log.debug("#{@new_resource} set user to #{@new_resource.user} for #{dir}")
                end
                if @new_resource.group
                  FileUtils.chown(nil, @new_resource.group, dir)
                  Chef::Log.debug("#{@new_resource} set group to #{@new_resource.group} for #{dir}")
                end
              rescue => e
                raise Chef::Exceptions::FileNotFound.new("Cannot create directory #{dir}: #{e.message}")
              end
            end
          end