]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/engine/filesys.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / tools / build / src / engine / filesys.h
CommitLineData
7c673cae
FG
1/*
2 * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
3 *
4 * This file is part of Jam - see jam.c for Copyright information.
5 */
6
7/* This file is ALSO:
8 * Copyright 2001-2004 David Abrahams.
9 * Distributed under the Boost Software License, Version 1.0.
10 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
11 */
12
13/*
14 * filesys.h - OS specific file routines
15 */
16
17#ifndef FILESYS_DWA20011025_H
18#define FILESYS_DWA20011025_H
19
20#include "hash.h"
21#include "lists.h"
22#include "object.h"
23#include "pathsys.h"
24#include "timestamp.h"
25
26
27typedef struct file_info_t
28{
29 OBJECT * name;
30 char is_file;
31 char is_dir;
32 char exists;
33 timestamp time;
34 LIST * files;
35} file_info_t;
36
37typedef struct file_item FILEITEM;
38struct file_item
39{
40 file_info_t * value; /* expected to be equvalent with &FILEITEM */
41 FILEITEM * next;
42};
43
44typedef struct file_list
45{
46 FILEITEM * head;
47 FILEITEM * tail;
48 int size;
49} FILELIST;
50
51typedef file_info_t * * FILELISTITER; /* also &FILEITEM equivalent */
52
53
54typedef struct file_archive_info_t
55{
11fdf7f2 56 OBJECT * name;
7c673cae
FG
57 file_info_t * file;
58 FILELIST * members;
59} file_archive_info_t;
60
61
62typedef void (*archive_scanback)( void * closure, OBJECT * path, LIST * symbols,
63 int found, timestamp const * const );
64typedef void (*scanback)( void * closure, OBJECT * path, int found,
65 timestamp const * const );
66
67
68void file_archscan( char const * arch, scanback func, void * closure );
69void file_archivescan( OBJECT * path, archive_scanback func, void * closure );
70void file_build1( PATHNAME * const f, string * file ) ;
71void file_dirscan( OBJECT * dir, scanback func, void * closure );
72file_info_t * file_info( OBJECT * const path, int * found );
73int file_is_file( OBJECT * const path );
74int file_mkdir( char const * const path );
75file_info_t * file_query( OBJECT * const path );
76void file_remove_atexit( OBJECT * const path );
77void file_supported_fmt_resolution( timestamp * const );
78int file_time( OBJECT * const path, timestamp * const );
79
80
81/* Archive/library file support */
82file_archive_info_t * file_archive_info( OBJECT * const path, int * found );
83file_archive_info_t * file_archive_query( OBJECT * const path );
84
85/* FILELIST linked-list */
86FILELIST * filelist_new( OBJECT * path );
87FILELIST * filelist_push_back( FILELIST * list, OBJECT * path );
88FILELIST * filelist_push_front( FILELIST * list, OBJECT * path );
89FILELIST * filelist_pop_front( FILELIST * list );
90int filelist_length( FILELIST * list );
91void filelist_free( FILELIST * list );
92
93FILELISTITER filelist_begin( FILELIST * list );
94FILELISTITER filelist_end( FILELIST * list );
95FILELISTITER filelist_next( FILELISTITER it );
96file_info_t * filelist_item( FILELISTITER it );
97file_info_t * filelist_front( FILELIST * list );
98file_info_t * filelist_back( FILELIST * list );
99
b32b8144
FG
100int filelist_empty( FILELIST * list );
101
7c673cae
FG
102#define FL0 ((FILELIST *)0)
103
104
105/* Internal utility worker functions. */
106void file_query_posix_( file_info_t * const );
107
108void file_done();
109
110#endif