#include "boost/filesystem.hpp"
#include "cetlib/getenv.h"
#include "cetlib/split.h"
#include <iostream>
#include <string>
#include <vector>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 42 of file get-accessible-paths.cc.
51 auto const last_slash = to_match.find(
"/");
52 bool const slash_found{last_slash != std::string::npos};
55 to_match.erase(0, last_slash + 1);
58 if (spec.empty() || spec[0] ==
'/') {
59 print_paths(
"/"s + prefix,
"/"s + to_match,
true);
63 print_paths(
"./"s + prefix, to_match,
false);
66 if (spec[0] !=
'/' && spec.find(
"./") != 0) {
69 std::vector<std::string> paths;
71 for (
auto const& path : paths) {
74 print_paths(path + prefix, to_match,
false);
std::string getenv(std::string const &name)
void split(std::string const &s, char c, OutIter dest)