Skip to content

Commit 88170a2

Browse files
committed
Tweaked documentation a bit
1 parent 23b239b commit 88170a2

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/main/java/engineering/swat/watch/WatchScope.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
*/
66
public enum WatchScope {
77
/**
8-
* Watch changes to a single file or (metadata of) a directory, but not its
9-
* content. That is, the following changes to a directory are watched:
10-
* - any modification caused by the creation of a nested file/directory;
11-
* - any modification caused by the deletion of a nested file/directory;
12-
* - any modification of its own metadata.
8+
* <p>Watch changes to a single file or (metadata of) a single directory. </p>
139
*
14-
* When changes to nested files/directories should also be watched, use
15-
* PATH_AND_CHILDREN or PATH_AND_ALL_DESCENDANTS.
10+
* <p>Note, depending on the platform you can receive events for a directory
11+
* in case of these events: </p>
12+
* <ul>
13+
* <li>a MODIFIED caused by the creation of a nested file/directory </li>
14+
* <li>a MODIFIED caused by the deletion of a nested file/directory </li>
15+
* <li>a MODIFIED of its own metadata</li>
16+
* </ul>
17+
*
18+
* <p>In most cases when Path is a Directory you're interested in which nested entries changes, in that case use {@link #PATH_AND_CHILDREN} or {@link #PATH_AND_ALL_DESCENDANTS}. </p>
1619
*/
1720
PATH_ONLY,
1821
/**

src/main/java/engineering/swat/watch/Watcher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
import engineering.swat.watch.impl.JDKRecursiveDirectoryWatcher;
1818

1919
/**
20-
* Watch a path for changes.
20+
* <p>Watch a path for changes.</p>
2121
*
22-
* It will avoid common errors using the raw apis, and will try to use the most native api where possible.
22+
*
23+
* <p>It will avoid common errors using the raw apis, and will try to use the most native api where possible.</p>
2324
* Note, there are differences per platform that cannot be avoided, please review the readme of the library.
2425
*/
2526
public class Watcher {

0 commit comments

Comments
 (0)