129 lines
4.3 KiB
Plaintext
129 lines
4.3 KiB
Plaintext
Mise à disposition fichier de télétransmission
|
|
----------------------------------------------
|
|
|
|
Utilisation des événements INOTIFY pour la surveillance des dossiers
|
|
|
|
The command may contain these wildcards:
|
|
|
|
$$ - a dollar sign
|
|
$@ - the watched filesystem path (see above)
|
|
$# - the event-related file name
|
|
$% - the event flags (textually)
|
|
$& - the event flags (numerically)
|
|
|
|
Events
|
|
|
|
IN_ACCESS
|
|
File was accessed (read) (*).
|
|
|
|
IN_ATTRIB
|
|
Metadata changed, e.g., permissions, timestamps, extended attributes, link count (since Linux 2.6.25), UID, GID, etc. (*).
|
|
|
|
IN_CLOSE_WRITE
|
|
File opened for writing was closed (*).
|
|
|
|
IN_CLOSE_NOWRITE
|
|
File not opened for writing was closed (*).
|
|
|
|
IN_CREATE
|
|
File/directory created in watched directory (*).
|
|
|
|
IN_DELETE
|
|
File/directory deleted from watched directory (*).
|
|
|
|
IN_DELETE_SELF
|
|
Watched file/directory was itself deleted.
|
|
|
|
IN_MODIFY
|
|
File was modified (*).
|
|
|
|
IN_MOVE_SELF
|
|
Watched file/directory was itself moved.
|
|
|
|
IN_MOVED_FROM
|
|
File moved out of watched directory (*).
|
|
|
|
IN_MOVED_TO
|
|
File moved into watched directory (*).
|
|
|
|
IN_OPEN
|
|
File was opened (*).
|
|
When monitoring a directory, the events marked with an asterisk (*) above can occur for files in the directory,
|
|
in which case the name field in the returned inotify_event structure identifies the name of the file within the
|
|
directory.
|
|
|
|
The IN_ALL_EVENTS macro is defined as a bit mask of all of the above events. This macro can be used as the mask
|
|
argument when calling inotify_add_watch(2).
|
|
|
|
Two additional convenience macros are IN_MOVE, which equates to IN_MOVED_FROM|IN_MOVED_TO, and IN_CLOSE, which
|
|
equates to IN_CLOSE_WRITE|IN_CLOSE_NOWRITE.
|
|
|
|
The following further bits can be specified in mask when calling inotify_add_watch(2):
|
|
IN_DONT_FOLLOW (since Linux 2.6.15)
|
|
Don't dereference pathname if it is a symbolic link.
|
|
|
|
IN_EXCL_UNLINK (since Linux 2.6.36)
|
|
By default, when watching events on the children of a directory, events are generated for children even after they have been unlinked from the directory. This can result in large numbers of uninteresting events for some applications (e.g., if watching /tmp, in which many applications create temporary files whose names are immediately unlinked). Specifying IN_EXCL_UNLINK changes the default behavior, so that events are not generated for children after they have been unlinked from the watched directory.
|
|
|
|
IN_MASK_ADD
|
|
Add (OR) events to watch mask for this pathname if it already exists (instead of replacing mask).
|
|
|
|
IN_ONESHOT
|
|
Monitor pathname for one event, then remove from watch list.
|
|
IN_ONLYDIR (since Linux 2.6.15)
|
|
|
|
Only watch pathname if it is a directory.
|
|
|
|
The following bits may be set in the mask field returned by read(2):
|
|
IN_IGNORED
|
|
Watch was removed explicitly (inotify_rm_watch(2)) or automatically (file was deleted, or file system was unmounted).
|
|
|
|
IN_ISDIR
|
|
Subject of this event is a directory.
|
|
|
|
IN_Q_OVERFLOW
|
|
Event queue overflowed (wd is -1 for this event).
|
|
|
|
IN_UNMOUNT
|
|
File system containing watched object was unmounted.
|
|
|
|
|
|
|
|
Configuration pour les fichiers en entrées
|
|
------------------------------------------
|
|
|
|
'client' => array(
|
|
'prestations' => array(
|
|
array(
|
|
'name' => Nom de la prestation pour référence (UPPERCASE)
|
|
'type' => Type du dépot SFTP|FTP
|
|
'directory' => Répertoire de dépot (par defaut "send")
|
|
'filemask' => Masque du fichier à récupérer ! not working
|
|
'in' => array(
|
|
--See the list of options--
|
|
),
|
|
'out' => array(
|
|
--See the list of options--
|
|
),
|
|
),
|
|
),
|
|
),
|
|
|
|
Send Options list (in)
|
|
----------------------
|
|
- CopyAddDate - Copy file and add a timestamp to the end of the filename
|
|
- CopyDeleteAfter - After copying the file delete it in repository
|
|
- RunWithEndFile - Only execute action when we receive file with extension .fin or .end
|
|
- Log - Log transfert disable by default
|
|
- Route - For each Route options (cp, ftp, sftp, mail)
|
|
cp => realpath of dir
|
|
ftp
|
|
sftp
|
|
mail
|
|
- FilterName - Filtre par nom de prestation (true) ou par nom défini
|
|
|
|
Recv Options list (out)
|
|
-----------------------
|
|
- Log - Log read disable by default
|
|
|