afs_folder_watch - AFS - Reference Guides

AFS Filters Description

Product
AFS
AFS_Version
7.12
Category
Reference Guides
language
English

The folder watch filter is used to watch a directory using the Linux notify system. New documents appearing in the watched directory are sent to the PaF. The filter ignores documents which are sent by the PaF and simply passes them to the next filter.

The filter is declared with the afs_folder_watch type. It is in the antidot-paf package. It is a generator filter.

The Disk folder watch filter specifications are described in the following table:

Parameter name

Mandatory

Type

Default

Description

suffix

Yes

string

N/A

Only files with this suffix will be monitored (ex: xml)

watch_dir

Yes

directory

N/A

Local directory to watch

output_layer

No

layer

CONTENTS

Name of the layer to fill with contents of new files

timeout

No

integer

60

Duration (in seconds) during which the filter will be watching the directory. The filter expects during this duration a first file with the good extension (set by the parameter suffix) to be dropped in the good directory (set by by the parameter watch_dir). Therefore, it waits during the time defined by this parameter (in seconds) before exiting. If by the end of this time, another file is dropped, the wait time is reseted.

This filter ignores modifications and deletions of files in the watched directory. The watched directory must be compatible with inotify, this excludes network shares (NFS, CIFS ...).