class SyncDirectoryWatcher
Defined at line 62 of file ../../sdk/lib/component/incoming/cpp/directory_watcher.h
SyncDirectoryWatcher allows directories to be waited for synchronously.
The directory can be specified in multiple forms:
- a fidl::UnownedClientEnd
<fuchsia
_io::Directory>
- a fidl::UnownedClientEnd
<fuchsia
_io::Directory> and a path relative to it
- a full path, which will be opened relative to the root of the component's namespace.
The instantiation arguments will not be checked until GetNextEntry is first called.
Public Methods
void SyncDirectoryWatcher (fidl::UnownedClientEnd<fuchsia_io::Directory> dir)
Defined at line 64 of file ../../sdk/lib/component/incoming/cpp/directory_watcher.h
void SyncDirectoryWatcher (fidl::UnownedClientEnd<fuchsia_io::Directory> dir, const std::string & relative_path)
Defined at line 65 of file ../../sdk/lib/component/incoming/cpp/directory_watcher.h
void SyncDirectoryWatcher (const std::string & full_path)
Defined at line 68 of file ../../sdk/lib/component/incoming/cpp/directory_watcher.h
zx::result<std::string> GetNextEntry (bool stop_at_idle, zx::time deadline)
Sequentially query for directory entries at the directory given at initialization
This call will block until a directory entry is found. When an entry is detected, the
name of the entry is returned.
Subsequent calls to GetNextEntry will return other entries if they exist.
GetNextEntry will iterate through all directory entries of a given directory.
When all of the existing directory entries have been returned,
if |stop_at_idle| is true, GetNextEntry will return a zx::error(ZX_ERR_STOP).
Otherwise, GetNextEntry will wait until |deadline| for a new instance to appear.
Defined at line 108 of file ../../sdk/lib/component/incoming/cpp/directory_watcher.cc