com.microsoft.tfs.core.clients.versioncontrol.localworkspace
Interface PathWatcher


public interface PathWatcher

An interface that allows more optimized local path access, by watching files for changes and only scanning those as necessary.

Thread-safety:
thread-safe

Method Summary
 java.lang.String getPath()
          Gets the root path that this watcher is watching
 boolean hasChanged()
          Queries if there are any paths that have changed since the watching started (or since the last call to setClean().
 boolean isWatching()
          Queries whether this path watcher is currently watching.
 PathWatcherReport poll()
          Retrieves a report of the paths which have changed under this PathWatcher's observations since the last time Poll() was invoked.
 void setClean()
          Sets this watcher to clean, removing any paths that have been changed.
 void startWatching()
          Enables this path watcher.
 void stopWatching()
          Disables this path watcher.
 

Method Detail

getPath

java.lang.String getPath()
Gets the root path that this watcher is watching

Returns:
The path this watcher is watching (not null)

hasChanged

boolean hasChanged()
Queries if there are any paths that have changed since the watching started (or since the last call to setClean().

Returns:
true if paths have changed, false otherwise

startWatching

void startWatching()
Enables this path watcher.


stopWatching

void stopWatching()
Disables this path watcher.


isWatching

boolean isWatching()
Queries whether this path watcher is currently watching.

Returns:
true if this watcher is operating, false otherwise

setClean

void setClean()
Sets this watcher to clean, removing any paths that have been changed.


poll

PathWatcherReport poll()
Retrieves a report of the paths which have changed under this PathWatcher's observations since the last time Poll() was invoked.

Returns:
A PathWatcherReport


© 2015 Microsoft. All rights reserved.