| 1 | // Copyright (c) 2014-2015 The Notify Authors. All rights reserved. |
| 2 | // Use of this source code is governed by the MIT license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // +build solaris illumos |
| 6 | |
| 7 | package notify |
| 8 | |
| 9 | const ( |
| 10 | osSpecificCreate Event = 0x00000100 << iota |
| 11 | osSpecificRemove |
| 12 | osSpecificWrite |
| 13 | osSpecificRename |
| 14 | // internal |
| 15 | // recursive is used to distinguish recursive eventsets from non-recursive ones |
| 16 | recursive |
| 17 | // omit is used for dispatching internal events; only those events are sent |
| 18 | // for which both the event and the watchpoint has omit in theirs event sets. |
| 19 | omit |
| 20 | ) |
| 21 | |
| 22 | const ( |
| 23 | // FileAccess is an event reported when monitored file/directory was accessed. |
| 24 | FileAccess = fileAccess |
| 25 | // FileModified is an event reported when monitored file/directory was modified. |
| 26 | FileModified = fileModified |
| 27 | // FileAttrib is an event reported when monitored file/directory's ATTRIB |
| 28 | // was changed. |
| 29 | FileAttrib = fileAttrib |
| 30 | // FileDelete is an event reported when monitored file/directory was deleted. |
| 31 | FileDelete = fileDelete |
| 32 | // FileRenameTo to is an event reported when monitored file/directory was renamed. |
| 33 | FileRenameTo = fileRenameTo |
| 34 | // FileRenameFrom is an event reported when monitored file/directory was renamed. |
| 35 | FileRenameFrom = fileRenameFrom |
| 36 | // FileTrunc is an event reported when monitored file/directory was truncated. |
| 37 | FileTrunc = fileTrunc |
| 38 | // FileNoFollow is an flag to indicate not to follow symbolic links. |
| 39 | FileNoFollow = fileNoFollow |
| 40 | // Unmounted is an event reported when monitored filesystem was unmounted. |
| 41 | Unmounted = unmounted |
| 42 | // MountedOver is an event reported when monitored file/directory was mounted on. |
| 43 | MountedOver = mountedOver |
| 44 | ) |
| 45 | |
| 46 | var osestr = map[Event]string{ |
| 47 | FileAccess: "notify.FileAccess", |
| 48 | FileModified: "notify.FileModified", |
| 49 | FileAttrib: "notify.FileAttrib", |
| 50 | FileDelete: "notify.FileDelete", |
| 51 | FileRenameTo: "notify.FileRenameTo", |
| 52 | FileRenameFrom: "notify.FileRenameFrom", |
| 53 | FileTrunc: "notify.FileTrunc", |
| 54 | FileNoFollow: "notify.FileNoFollow", |
| 55 | Unmounted: "notify.Unmounted", |
| 56 | MountedOver: "notify.MountedOver", |
| 57 | } |