]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/engine/filesys.h
import new upstream nautilus stable release 14.2.8
[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
92f5a8d4 20#include "config.h"
7c673cae
FG
21#include "hash.h"
22#include "lists.h"
23#include "object.h"
24#include "pathsys.h"
25#include "timestamp.h"
26
27
28typedef struct file_info_t
29{
30 OBJECT * name;
31 char is_file;
32 char is_dir;
33 char exists;
34 timestamp time;
35 LIST * files;
36} file_info_t;
37
38typedef struct file_item FILEITEM;
39struct file_item
40{
92f5a8d4 41 file_info_t * value; /* expected to be equivalent with &FILEITEM */
7c673cae
FG
42 FILEITEM * next;
43};
44
45typedef struct file_list
46{
47 FILEITEM * head;
48 FILEITEM * tail;
49 int size;
50} FILELIST;
51
52typedef file_info_t * * FILELISTITER; /* also &FILEITEM equivalent */
53
54
55typedef struct file_archive_info_t
56{
11fdf7f2 57 OBJECT * name;
7c673cae
FG
58 file_info_t * file;
59 FILELIST * members;
60} file_archive_info_t;
61
62
63typedef void (*archive_scanback)( void * closure, OBJECT * path, LIST * symbols,
64 int found, timestamp const * const );
65typedef void (*scanback)( void * closure, OBJECT * path, int found,
66 timestamp const * const );
67
68
69void file_archscan( char const * arch, scanback func, void * closure );
70void file_archivescan( OBJECT * path, archive_scanback func, void * closure );
71void file_build1( PATHNAME * const f, string * file ) ;
72void file_dirscan( OBJECT * dir, scanback func, void * closure );
73file_info_t * file_info( OBJECT * const path, int * found );
74int file_is_file( OBJECT * const path );
75int file_mkdir( char const * const path );
76file_info_t * file_query( OBJECT * const path );
77void file_remove_atexit( OBJECT * const path );
78void file_supported_fmt_resolution( timestamp * const );
79int file_time( OBJECT * const path, timestamp * const );
80
81
82/* Archive/library file support */
83file_archive_info_t * file_archive_info( OBJECT * const path, int * found );
84file_archive_info_t * file_archive_query( OBJECT * const path );
85
86/* FILELIST linked-list */
87FILELIST * filelist_new( OBJECT * path );
88FILELIST * filelist_push_back( FILELIST * list, OBJECT * path );
89FILELIST * filelist_push_front( FILELIST * list, OBJECT * path );
90FILELIST * filelist_pop_front( FILELIST * list );
91int filelist_length( FILELIST * list );
92void filelist_free( FILELIST * list );
93
94FILELISTITER filelist_begin( FILELIST * list );
95FILELISTITER filelist_end( FILELIST * list );
96FILELISTITER filelist_next( FILELISTITER it );
97file_info_t * filelist_item( FILELISTITER it );
98file_info_t * filelist_front( FILELIST * list );
99file_info_t * filelist_back( FILELIST * list );
100
b32b8144
FG
101int filelist_empty( FILELIST * list );
102
7c673cae
FG
103#define FL0 ((FILELIST *)0)
104
105
106/* Internal utility worker functions. */
107void file_query_posix_( file_info_t * const );
108
109void file_done();
110
111#endif