cctools
batch_file.h
1 /*
2 Copyright (C) 2018- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef BATCH_FILE_H
8 #define BATCH_FILE_H
9 #include <errno.h>
10 #include <sys/types.h>
11 #include <dirent.h>
12 
13 #include "batch_job.h"
14 #include "sha1.h"
15 #include "list.h"
16 #include "debug.h"
17 #include "path.h"
18 
19 
20 struct batch_file {
21  char *outer_name;
22  char *inner_name;
23  char *hash;/* Checksum based on contents. */
24 };
25 
32 struct batch_file *batch_file_create(struct batch_queue *queue, const char *outer_name, const char *inner_name );
33 
38 void batch_file_delete(struct batch_file *f);
39 
47 char * batch_file_to_string(struct batch_queue *queue, struct batch_file *f );
48 
55 char * batch_files_to_string(struct batch_queue *queue, struct list *files );
56 
62 int batch_file_outer_compare(const void *file1, const void *file2);
63 
68 char * batch_file_generate_id(struct batch_file *f);
69 
74 char * batch_file_generate_id_dir(char *file_name);
75 
76 #endif
Batch job submission.
Definition: batch_file.h:20
General purpose debugging routines.
Robust, reentrant linked list structure.
Definition: batch_job_internal.h:50
Routines for computing SHA1 checksums.