[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / lib / DirectoryWatcher / DirectoryScanner.h
blob84cffa5704f76f57efb76fa473c6e3e81604df0d
1 //===- DirectoryScanner.h - Utility functions for DirectoryWatcher --------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "clang/DirectoryWatcher/DirectoryWatcher.h"
10 #include "llvm/Support/FileSystem.h"
11 #include <optional>
12 #include <string>
13 #include <vector>
15 namespace clang {
17 /// Gets names (filenames) of items in directory at \p Path.
18 /// \returns empty vector if \p Path is not a directory, doesn't exist or can't
19 /// be read from.
20 std::vector<std::string> scanDirectory(llvm::StringRef Path);
22 /// Create event with EventKind::Added for every element in \p Scan.
23 std::vector<DirectoryWatcher::Event>
24 getAsFileEvents(const std::vector<std::string> &Scan);
26 /// Gets status of file (or directory) at \p Path.
27 /// \returns std::nullopt if \p Path doesn't exist or can't get the status.
28 std::optional<llvm::sys::fs::file_status> getFileStatus(llvm::StringRef Path);
30 } // namespace clang