]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/GuidChk/FileSearch.h
Convert to unix format.
[mirror_edk2.git] / Tools / Source / TianoTools / GuidChk / FileSearch.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 FileSearch.h
15
16 Abstract:
17
18 Header file to support file searching.
19
20 --*/
21
22 #ifndef _FILE_SEARCH_H_
23 #define _FILE_SEARCH_H_
24
25 //
26 // Since the file searching routines are OS dependent, put the
27 // necessary include paths in this header file so that the non-OS-dependent
28 // files don't need to include these windows-specific header files.
29 //
30 #include <stdio.h>
31 #include <string.h>
32 #include <ctype.h>
33 #include <direct.h>
34 #include <windows.h>
35
36 //
37 // Return codes of some of the file search routines
38 //
39 #define STATUS_NOT_FOUND 0x1000
40
41 //
42 // Flags for what to search for. Also used in the FileFlags return field.
43 //
44 #define FILE_SEARCH_DIR 0x0001
45 #define FILE_SEARCH_FILE 0x0002
46
47 //
48 // Here's our class definition
49 //
50 typedef struct {
51 HANDLE Handle;
52 WIN32_FIND_DATA FindData;
53 UINT32 FileSearchFlags; // DIRS, FILES, etc
54 UINT32 FileFlags;
55 INT8 FileName[MAX_PATH]; // for portability
56 STRING_LIST *ExcludeDirs;
57 STRING_LIST *ExcludeFiles;
58 STRING_LIST *ExcludeExtensions;
59 } FILE_SEARCH_DATA;
60
61 //
62 // Here's our member functions
63 //
64 STATUS
65 FileSearchInit (
66 FILE_SEARCH_DATA *FSData
67 )
68 ;
69
70 STATUS
71 FileSearchDestroy (
72 FILE_SEARCH_DATA *FSData
73 )
74 ;
75
76 STATUS
77 FileSearchStart (
78 FILE_SEARCH_DATA *FSData,
79 char *FileMask,
80 UINT32 SearchFlags
81 )
82 ;
83
84 STATUS
85 FileSearchFindNext (
86 FILE_SEARCH_DATA *FSData
87 )
88 ;
89
90 STATUS
91 FileSearchExcludeDirs (
92 FILE_SEARCH_DATA *FSData,
93 STRING_LIST *StrList
94 )
95 ;
96 STATUS
97 FileSearchExcludeExtensions (
98 FILE_SEARCH_DATA *FSData,
99 STRING_LIST *StrList
100 )
101 ;
102 STATUS
103 FileSearchExcludeFiles (
104 FILE_SEARCH_DATA *FSData,
105 STRING_LIST *StrList
106 )
107 ;
108 #endif