TABLE OF CONTENTS
- 1. Hunter/Inotify
- 1.1. Inotify/Event_Data
- 1.2. Inotify/Events_Container
- 1.3. Inotify/Inotify_Events
- 1.4. Inotify/Mask_Array
- 1.5. Inotify/Watch_Data
- 1.6. Inotify/Watches_Container
- 1.7. Inotify/EventsList
- 1.8. Inotify/Instance
- 1.9. Inotify/Watches
- 1.10. Inotify/AddWatch
- 1.11. Inotify/AddWatches
- 1.12. Inotify/CreateMask
- 1.13. Inotify/inotify_add_watch
- 1.14. Inotify/inotify_init
- 1.15. Inotify/inotify_rm_watch
- 1.16. Inotify/InotifyClose
- 1.17. Inotify/InotifyInit
- 1.18. Inotify/InotifyRead
- 1.19. Inotify/RemoveWatch
- 1.20. Inotify/RemoveWatches
Hunter/Inotify [ Packages ]
FUNCTION
Small Ada binding to kernel inotify
SOURCE
package Inotify is
Inotify/Event_Data [ Types ]
FUNCTION
Data structure used to store information about inotify event
SOURCE
type Event_Data is record Event: Inotify_Events; Target: Unbounded_String; Path: Unbounded_String; end record;
OPTIONS
Event - inotify event Target - target file or directory Path - path in which event occurs
Inotify/Events_Container [ Types ]
FUNCTION
Used to store data about inotify events
SOURCE
package Events_Container is new Vectors(Positive, Event_Data);
Inotify/Inotify_Events [ Types ]
FUNCTION
Types of inotify events and values for them
SOURCE
type Inotify_Events is (Accessed, Modified, Metadata, Closed_Write, Closed_No_Write, Opened, Moved_From, Moved_To, Created, Deleted, Deleted_Self, Moved_Self, Unmounted_Filesystem); for Inotify_Events use (Accessed => 16#0001#, Modified => 16#0002#, Metadata => 16#0004#, Closed_Write => 16#0008#, Closed_No_Write => 16#0010#, Opened => 16#0020#, Moved_From => 16#0040#, Moved_To => 16#0080#, Created => 16#0100#, Deleted => 16#0200#, Deleted_Self => 16#0400#, Moved_Self => 16#0800#, Unmounted_Filesystem => 16#2000#);
Inotify/EventsList [ Variables ]
[ Top ] [ Inotify ] [ Variables ]
FUNCTION
List of all caught inotify events
SOURCE
EventsList: Events_Container.Vector;
Inotify/AddWatches [ Subprograms ]
[ Top ] [ Inotify ] [ Subprograms ]
FUNCTION
Add inotify watches for selected path and all subdirectories inside it, but not deeper.
SOURCE
procedure AddWatches(Path: String);
PARAMETERS
Path - Full path to which inotify watches will be added
Inotify/InotifyClose [ Subprograms ]
[ Top ] [ Inotify ] [ Subprograms ]
FUNCTION
Close inotify instance
SOURCE
procedure InotifyClose;
Inotify/InotifyInit [ Subprograms ]
[ Top ] [ Inotify ] [ Subprograms ]
FUNCTION
Start inotify instance
SOURCE
procedure InotifyInit;
Inotify/InotifyRead [ Subprograms ]
[ Top ] [ Inotify ] [ Subprograms ]
FUNCTION
Read all caught and waiting inotify events and store them in EventsList. If need, remove and add new watches also.
SOURCE
procedure InotifyRead;
Inotify/RemoveWatches [ Subprograms ]
[ Top ] [ Inotify ] [ Subprograms ]
FUNCTION
Remove all inotify watches
SOURCE
procedure RemoveWatches;