def saveInputs(savedInputsDir, listOfFilesAndDirsToSave):
    """Copies the list of files to a directory created in the save inputs dir,
    and returns the name of this directory.
    """
    logger.info("Saving the inputs: %s to the directory: %s" % (" ".join(listOfFilesAndDirsToSave), savedInputsDir))
    assert os.path.isdir(savedInputsDir)
    #savedInputsDir = getTempDirectory(saveInputsDir)
    createdFiles = []
    for fileName in listOfFilesAndDirsToSave:
        if os.path.isfile(fileName):
            copiedFileName = os.path.join(savedInputsDir, os.path.split(fileName)[-1])
            system("cp %s %s" % (fileName, copiedFileName))
        else:
            copiedFileName = os.path.join(savedInputsDir, os.path.split(fileName)[-1]) + ".tar"
            system("tar -cf %s %s" % (copiedFileName, fileName))
        createdFiles.append(copiedFileName)
    return createdFiles
def saveInputs ( savedInputsDir , listOfFilesAndDirsToSave ) : logger . info ( "Saving the inputs: %s to the directory: %s" % ( " " . join ( listOfFilesAndDirsToSave ) , savedInputsDir ) ) assert os . path . isdir ( savedInputsDir ) createdFiles = [ ] for fileName in listOfFilesAndDirsToSave : if os . path . isfile ( fileName ) : copiedFileName = os . path . join ( savedInputsDir , os . path . split ( fileName ) [ - 1 ] ) system ( "cp %s %s" % ( fileName , copiedFileName ) ) else : copiedFileName = os . path . join ( savedInputsDir , os . path . split ( fileName ) [ - 1 ] ) + ".tar" system ( "tar -cf %s %s" % ( copiedFileName , fileName ) ) createdFiles . append ( copiedFileName ) return createdFiles
Copies the list of files to a directory created in the save inputs dir,
    and returns the name of this directory.