BBjFileSystem::unwatchDirectory

Description

In BBj 17.0 and higher, this method stops watching the specified directory for changes (create, modify, delete). This directory must have been previously watched using BBjFileSystem::watchDirectory.

Syntax

Return Value

Method

string

unwatchDirectory(string directory)

Parameters

Variable

Description

directory

The directory to stop watching for changes.

Return Value

Returns the full directory path.

Remarks

None.

Example

rem ' BBjFileSystem::unwatchDirectory

setesc eoj
fs! = bbjapi().getFileSystem()
print "watchDirectory ",fs!.watchDirectory(".","watch")
print "watchDirectory ",fs!.watchDirectory("..","watch")
process_events

eoj:
    rem ' unwatch individual directories
    fs!.unwatchDirectory(".")
    fs!.unwatchDirectory("..")

    rem ' or unwatch all of them at once
    fs!.unwatchAllDirectories()
release

watch:
    event! = bbjapi().getLastEvent()
    print event!.getEventName()," ",
    print event!.getDirectory()," ",
    print event!.getFilename()," ",
    print event!.getAction(),
    print event!.getChange()
return

See Also

BBjDirectoryChangeEvent

BBjFileSystem

BBjFileSystem::watchDirectory

BBjFileSystem::unwatchAllDirectories

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.