-
Notifications
You must be signed in to change notification settings - Fork 3
/
file_tree.h
43 lines (33 loc) · 1.1 KB
/
file_tree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/****************************************************************************
* Copyright 2023 UT Battelle, LLC
*
* This work was supported by the Oak Ridge Leadership Computing Facility at
* the Oak Ridge National Laboratory, which is managed by UT Battelle, LLC for
* the U.S. DOE (under the contract No. DE-AC05-00OR22725).
*
* This file is part of the LCIO project.
****************************************************************************/
//
// Created by Matthew Bachstein on 7/6/18.
//
#ifndef LCIO_FILE_TREE_H
#define LCIO_FILE_TREE_H
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <search.h>
#include "lcio.h"
#define MAX_FNAME_SIZE 61
static const char alphanum[] = "abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789";
struct file_entry{
char* fname; // this will be the key,
off_t size; // if size is 0, it is a dir.
};
off_t age_file_system(lcio_job_t* job, lcio_dist_t* dist);
#endif //LCIO_FILE_TREE_H