package org.broadinstitute.sting.queue.function.scattergather

import java.io.File
import org.broadinstitute.sting.queue.function.CommandLineFunction
import org.broadinstitute.sting.commandline.{Output, Input}

class CreateTempDirsFunction extends CommandLineFunction {
  @Input(doc="Original inputs to the scattered function")
  var originalInputs: Set[Any] = Set.empty[Any]

  @Output(doc="Temporary directories to create")
  var tempDirectories: List[File] = Nil

  def commandLine = "mkdir%s".format(repeat(" '", tempDirectories, "'"))
}

package org.broadinstitute.sting.queue.function.scattergather

import java.io.File
import org.broadinstitute.sting.queue.function.CommandLineFunction
import org.broadinstitute.sting.commandline.{Output, Input}

class CreateTempDirsFunction extends CommandLineFunction {
  @Input(doc="Original inputs to the scattered function")
  var originalInputs: Set[Any] = Set.empty[Any]

  @Output(doc="Temporary directories to create")
  var tempDirectories: List[File] = Nil

  def commandLine = "mkdir -pv%s".format(repeat(" '", tempDirectories, "'"))
}

Create intermediate directories and don't error if the directory already exists.
Create intermediate directories and don't error if the directory already exists.

git-svn-id: 4561c0a8f080806b19201efb9525134c00b76d40@3899 348d0f76-0448-11de-a6fe-93d51630548a
