mirror of
https://github.com/atom/atom.git
synced 2026-01-14 17:38:03 -05:00
Private diagnostic method to dump the active watchers
This commit is contained in:
@@ -431,6 +431,14 @@ class NativeWatcherRegistry {
|
||||
watcher.attachToNative(native, nativePath)
|
||||
})
|
||||
}
|
||||
|
||||
// Private: Generate a visual representation of the currently active watchers managed by this
|
||||
// registry.
|
||||
//
|
||||
// Returns a {String} showing the tree structure.
|
||||
print() {
|
||||
return this.tree.print()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {NativeWatcherRegistry}
|
||||
|
||||
@@ -581,6 +581,11 @@ class PathWatcherManager {
|
||||
return watcher
|
||||
}
|
||||
|
||||
// Private: Return a {String} depicting the currently active native watchers.
|
||||
print () {
|
||||
return this.nativeRegistry.print()
|
||||
}
|
||||
|
||||
// Private: Stop all living watchers.
|
||||
//
|
||||
// Returns a {Promise} that resolves when all native watcher resources are disposed.
|
||||
@@ -641,4 +646,9 @@ function stopAllWatchers () {
|
||||
return PathWatcherManager.instance().stopAllWatchers()
|
||||
}
|
||||
|
||||
module.exports = {watchPath, stopAllWatchers}
|
||||
// Private: Show the currently active native watchers.
|
||||
function printWatchers () {
|
||||
return PathWatcherManager.instance().print()
|
||||
}
|
||||
|
||||
module.exports = {watchPath, stopAllWatchers, printWatchers}
|
||||
|
||||
Reference in New Issue
Block a user