source: icGREP/icgrep-devel/icgrep/util/file_select.h @ 5999

Last change on this file since 5999 was 5999, checked in by cameron, 13 months ago

Handling of file system errors

File size: 1.5 KB
Line 
1/*
2 *  Copyright (c) 2018 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 *
6 *  This file defines commmand-line options and parameters for
7 *  file selection as used by various command line tools.
8 *
9 */
10#ifndef FILE_SELECT_H
11#define FILE_SELECT_H
12 
13#include <string>       // for string
14#include <vector>
15#include <llvm/Support/CommandLine.h>
16#include <boost/filesystem.hpp>
17
18namespace re {class RE;}
19
20namespace argv {
21
22extern bool NoMessagesFlag;  // -s
23   
24enum DevDirAction {Read, Skip, Recurse};
25extern DevDirAction DevicesFlag;
26extern DevDirAction DirectoriesFlag;
27
28   
29    // Use DirectoriesFlag==Recurse to test for recursive mode.
30extern bool RecursiveFlag; 
31extern bool DereferenceRecursiveFlag; // -R
32
33extern bool MmapFlag; // -mmap
34
35extern std::string ExcludeFlag; // -exclude
36extern std::string ExcludeFromFlag; // -exclude-from
37extern std::string ExcludeDirFlag; // -exclude-dir
38extern std::string IncludeFlag; // -include
39
40// File exclude pattern parsed from ExcludeFlag and ExcludeFromFlag
41re::RE * getFileExcludePattern();
42
43// File exclude pattern parsed from ExcludeDirFlag.
44re::RE * getDirectoryExcludePattern();
45
46// File include pattern parsed from InludeFlag
47re::RE * getFileIncludePattern();
48
49// Determine whether include is the default for files that do not match any pattern.
50bool includeIsDefault();
51
52extern bool UseStdIn;
53   
54std::vector<boost::filesystem::path> getFullFileList(llvm::cl::list<std::string> & inputFiles);
55}
56#endif
Note: See TracBrowser for help on using the repository browser.