Skip to content

Commit

Permalink
wip: triggering build
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMonkmanHolition committed Apr 21, 2024
1 parent 0e4fa06 commit 2b596d5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Drop [FileWatch.hpp](https://github.com/ThomasMonkman/filewatch/blob/master/File

Works on:

- Clang 4 and higher
- GCC 4.8 and higher
- Clang 4 and higher
- GCC 4.8 and higher
- Visual Studio 2015 and higher should be supported, however only 2019 is on the ci and tested

#### Examples:
Expand All @@ -29,7 +29,7 @@ On linux or none unicode windows change std::wstring for std::string or std::fil
###### Simple: <a id="1"></a>
```cpp
filewatch::FileWatch<std::wstring> watch(
L"C:/Users/User/Desktop/Watch/Test"s,
L"C:/Users/User/Desktop/Watch/Test"s,
[](const std::wstring& path, const filewatch::Event change_type) {
std::wcout << path << L"\n";
}
Expand All @@ -39,7 +39,7 @@ filewatch::FileWatch<std::wstring> watch(
###### Change Type: <a id="2"></a>
```cpp
filewatch::FileWatch<std::wstring> watch(
L"C:/Users/User/Desktop/Watch/Test"s,
L"C:/Users/User/Desktop/Watch/Test"s,
[](const std::wstring& path, const filewatch::Event change_type) {
std::wcout << path << L" : ";
switch (change_type)
Expand Down Expand Up @@ -80,29 +80,29 @@ filewatch::FileWatch<std::wstring> watch(
###### Using std::filesystem: <a id="4"></a>
```cpp
filewatch::FileWatch<std::filesystem::path> watch(
L"C:/Users/User/Desktop/Watch/Test"s,
L"C:/Users/User/Desktop/Watch/Test"s,
[](const std::filesystem::path& path, const filewatch::Event change_type) {
std::wcout << std::filesystem::absolute(path) << L"\n";
std::wcout << std::filesystem::absolute(path) << L"\n";
}
);
```

###### Works with relative paths: <a id="5"></a>
```cpp
filewatch::FileWatch<std::filesystem::path> watch(
L"./"s,
L"./"s,
[](const std::filesystem::path& path, const filewatch::Event change_type) {
std::wcout << std::filesystem::absolute(path) << L"\n";
std::wcout << std::filesystem::absolute(path) << L"\n";
}
);
```

###### Single file watch: <a id="6"></a>
```cpp
filewatch::FileWatch<std::wstring> watch(
L"./test.txt"s,
L"./test.txt"s,
[](const std::wstring& path, const filewatch::Event change_type) {
std::wcout << path << L"\n";
std::wcout << path << L"\n";
}
);
```

0 comments on commit 2b596d5

Please sign in to comment.