Example #1
0
static char *getSamDir()
/* Return the name of a trash dir for samtools to run in (it creates files in current dir)
 * and make sure the directory exists. */
{
    static char *samDir = NULL;
    char *dirName = "samtools";
    if (samDir == NULL)
    {
        mkdirTrashDirectory(dirName);
        size_t len = strlen(trashDir()) + 1 + strlen(dirName) + 1;
        samDir = needMem(len);
        safef(samDir, len, "%s/%s", trashDir(), dirName);
    }
    return samDir;
}
static void rnaTrashDirsInit(char **tables, int count)
/*	create trash directories if necessary */
{
for ( count--; count > -1; count--)
    mkdirTrashDirectory(tables[count]);
}