]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/filesys.h
2 * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
4 * This file is part of Jam - see jam.c for Copyright information.
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)
14 * filesys.h - OS specific file routines
17 #ifndef FILESYS_DWA20011025_H
18 #define FILESYS_DWA20011025_H
25 #include "timestamp.h"
30 typedef struct file_info_t
40 typedef struct file_item FILEITEM
;
43 file_info_t
* value
; /* expected to be equivalent with &FILEITEM */
47 typedef struct file_list
54 typedef file_info_t
* * FILELISTITER
; /* also &FILEITEM equivalent */
57 typedef struct file_archive_info_t
62 } file_archive_info_t
;
65 typedef void (*archive_scanback
)( void * closure
, OBJECT
* path
, LIST
* symbols
,
66 int found
, timestamp
const * const );
67 typedef void (*scanback
)( void * closure
, OBJECT
* path
, int found
,
68 timestamp
const * const );
71 void file_archscan( char const * arch
, scanback func
, void * closure
);
72 void file_archivescan( OBJECT
* path
, archive_scanback func
, void * closure
);
73 void file_build1( PATHNAME
* const f
, string
* file
) ;
74 void file_dirscan( OBJECT
* dir
, scanback func
, void * closure
);
75 file_info_t
* file_info( OBJECT
* const path
, int * found
);
76 int file_is_file( OBJECT
* const path
);
77 int file_mkdir( char const * const path
);
78 file_info_t
* file_query( OBJECT
* const path
);
79 void file_remove_atexit( OBJECT
* const path
);
80 void file_supported_fmt_resolution( timestamp
* const );
81 int file_time( OBJECT
* const path
, timestamp
* const );
83 namespace b2
{ namespace filesys
{
85 inline bool is_file(const std::string
&path
)
87 OBJECT
* path_o
= object_new(path
.c_str());
88 bool result
= file_is_file(path_o
) == 1;
96 /* Archive/library file support */
97 file_archive_info_t
* file_archive_info( OBJECT
* const path
, int * found
);
98 file_archive_info_t
* file_archive_query( OBJECT
* const path
);
100 /* FILELIST linked-list */
101 FILELIST
* filelist_new( OBJECT
* path
);
102 FILELIST
* filelist_push_back( FILELIST
* list
, OBJECT
* path
);
103 FILELIST
* filelist_push_front( FILELIST
* list
, OBJECT
* path
);
104 FILELIST
* filelist_pop_front( FILELIST
* list
);
105 int filelist_length( FILELIST
* list
);
106 void filelist_free( FILELIST
* list
);
108 FILELISTITER
filelist_begin( FILELIST
* list
);
109 FILELISTITER
filelist_end( FILELIST
* list
);
110 FILELISTITER
filelist_next( FILELISTITER it
);
111 file_info_t
* filelist_item( FILELISTITER it
);
112 file_info_t
* filelist_front( FILELIST
* list
);
113 file_info_t
* filelist_back( FILELIST
* list
);
115 int filelist_empty( FILELIST
* list
);
117 #define FL0 ((FILELIST *)0)
120 /* Internal utility worker functions. */
121 void file_query_posix_( file_info_t
* const );