/* {"description" : "Event details, for file system events."} */
data FileEventInfo{
/* {"@description" : "Constant indicating an entity creation."} */
const byte E_CREATE = 1
/* {"@description" : "Constant indicating an entity deletion."} */
const byte E_DELETE = 2
/* {"@description" : "Constant indicating an entity modification."} */
const byte E_MODIFY = 3
/* {"@description" : "Constant indicating an entity rename."} */
const byte E_RENAME = 4
/* {"@description" : "This field indicates what kind of change event is being reported, taking a value from the E_ constants."} */
byte eventType
/* {"@description" : "Constant indicating a file item type."} */
const byte I_FILE = 1
/* {"@description" : "Constant indicating a directory item type."} */
const byte I_DIRECTORY = 2
/* {"@description" : "This field indicates whether itemPath is a file or directory, taking a value from the I_ constants."} */
byte itemType
/* {"@description" : "The path of the file system element being watched."} */
char listenPath[]
/* {"@description" : "The path of file system element to which the event relates (only used for directory-based events)."} */
char itemPath[]
/* {"@description" : "The path of file system element to which the event relates (only used for directory-based events)."} */
char itemPathB[]
}
/* {"description" : "Register to receive events for file system changes."} */
interface FileSystemEvents {
/* {"@description" : "This event is emitted when a file-relative change event occurs."} */
event fileEvent(FileEventInfo e)
/* {"@description" : "This event is emitted when a directory-relative change event occurs."} */
event directoryEvent(FileEventInfo e)
/* {"@description" : "Construct a new file system event listener."} */
FileSystemEvents()
/* {"@description" : "Listen for changes to a given file."} */
bool listenFile(char path[])
/* {"@description" : "Stop listening for changes to a given file."} */
void unlistenFile(char path[])
/* {"@description" : "Listen for changes to a given directory (monitoring its contents)."} */
bool listenDirectory(char path[])
/* {"@description" : "Stop listening for changes to a given directory."} */
void unlistenDirectory(char path[])
}
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n io.FileSystemEvents -m "reason for update" -u yourUsername
Version 2 (this version) by barry
Notes for this version: Updates to documentation strings.