builder/extra/cluster-home/lib/ruby/tungsten/util.rb
def mkdir_if_absent(dirname)
    if dirname == nil
      return
    end
    
    if File.exists?(dirname)
      if File.directory?(dirname)
        debug("Found directory, no need to create: #{dirname}")
      else
        raise "Directory already exists as a file: #{dirname}"
      end
    else
      debug("Creating missing directory: #{dirname}")
      cmd_result("mkdir -p #{dirname}")
    end
  end
# Create a directory if it is absent. 
Create a directory if it is absent.
Create a directory if it is absent .
def mkdir_if_absent(dirname)
    if dirname == nil
      return
    end
    if File.exists?(dirname)
      if File.directory?(dirname)
        debug("Found directory, no need to create: #{dirname}")
      else
        raise "Directory already exists as a file: #{dirname}"
      end
    else
      debug("Creating missing directory: #{dirname}")
      cmd_result("mkdir -p #{dirname}")
    end
  end
def mkdir_if_absent ( dirname ) if dirname == nil return end if File . exists? ( dirname ) if File . directory? ( dirname ) debug ( "Found directory, no need to create: #{dirname}" ) else raise "Directory already exists as a file: #{dirname}" end else debug ( "Creating missing directory: #{dirname}" ) cmd_result ( "mkdir -p #{dirname}" ) end end
Create a directory if it is absent.
Create a directory if it is absent .
dirname