batch_file.h
Go to the documentation of this file.
/*
Copyright (C) 2024 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef BATCH_FILE_H
#define BATCH_FILE_H
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include "sha1.h"
#include "list.h"
#include "debug.h"
#include "path.h"
struct batch_file {
char *outer_name;
char *inner_name;
char *hash;
};
struct batch_file *batch_file_create(const char *outer_name, const char *inner_name );
void batch_file_delete(struct batch_file *f);
char * batch_file_to_string( struct batch_file *f );
char * batch_file_list_to_string( struct list *file_list );
int batch_file_outer_compare( struct batch_file *f1, struct batch_file *f2 );
char * batch_file_generate_id(struct batch_file *f);
char * batch_file_generate_id_dir(char *file_name);
#endif
batch_file_outer_compare
int batch_file_outer_compare(struct batch_file *f1, struct batch_file *f2)
Compare function for comparing batch_files based on outer_name.
batch_file_generate_id
char * batch_file_generate_id(struct batch_file *f)
Generate a sha1 hash based on the file contents.
batch_file_list_to_string
char * batch_file_list_to_string(struct list *file_list)
Output list of batch_files as a string.
batch_file_generate_id_dir
char * batch_file_generate_id_dir(char *file_name)
Generates a sha1 hash based on the directory's contents.
batch_file_create
struct batch_file * batch_file_create(const char *outer_name, const char *inner_name)
Create batch_file struct.
batch_file_delete
void batch_file_delete(struct batch_file *f)
Delete batch_file struct.
batch_file_to_string
char * batch_file_to_string(struct batch_file *f)
Output batch_file as a string.
debug.h
General purpose debugging routines.
list.h
Robust, reentrant linked list structure.
sha1.h
Routines for computing SHA1 checksums.
batch_file
Internal description of a single file used by a batch job.
Definition batch_file.h:28
batch_file::outer_name
char * outer_name
The name of the file in the submitters filesystem namespace.
Definition batch_file.h:29
batch_file::inner_name
char * inner_name
The name of the file as it should appear to the running job.
Definition batch_file.h:30
batch_file::hash
char * hash
The hierarchical checksum of this file/directory, when content based names are used.
Definition batch_file.h:31