Lines Matching refs:path
33 static DEFINE_string2(bytes, b, "", "A path to a file or a directory. If a file, the "
73 static int fuzz_file(SkString path, SkString type);
75 static SkString try_auto_detect(SkString path, SkString* name);
110 "Usage: fuzz -t <type> -b <path/to/file> [-n api-to-fuzz]\n"
111 " fuzz -b <path/to/file>\n"
117 SkString path = SkString(FLAGS_bytes.isEmpty() ? argv[0] : FLAGS_bytes[0]);
122 if (!sk_isdir(path.c_str())) {
124 int rv = fuzz_file(path, type);
132 SkOSFile::Iter it(path.c_str());
134 SkString p = SkOSPath::Join(path.c_str(), file.c_str());
146 static int fuzz_file(SkString path, SkString type) {
147 sk_sp<SkData> bytes(SkData::MakeFromFileName(path.c_str()));
149 SkDebugf("Could not read %s\n", path.c_str());
156 type = try_auto_detect(path, &name);
160 SkDebugf("Could not autodetect type of %s\n", path.c_str());
318 static SkString try_auto_detect(SkString path, SkString* name) {
323 if (std::regex_search(path.c_str(), m, clusterfuzz)) {
334 } else if (std::regex_search(path.c_str(), m, skiafuzzer)) {