private void publish(final Kind<?> kind, Path parent, String fileNameText, Pipe<FolderWatchSchema> target) {
if (StandardWatchEventKinds.ENTRY_CREATE == kind) {
publish(parent, fileNameText, target, Pipe.addMsgIdx(target, FolderWatchSchema.MSG_NEWFILE_1));
} else if (StandardWatchEventKinds.ENTRY_MODIFY == kind) {
publish(parent, fileNameText, target, Pipe.addMsgIdx(target, FolderWatchSchema.MSG_UPDATEDFILE_2));
} else if (StandardWatchEventKinds.ENTRY_DELETE == kind) {
publish(parent, fileNameText, target, Pipe.addMsgIdx(target, FolderWatchSchema.MSG_DELETEDFILE_3));
} else if (StandardWatchEventKinds.OVERFLOW == kind) {
logger.warn("Some file changes may not have been recognized by this stage, increase RATE or make slower changes to file system.");
} else {
throw new UnsupportedOperationException("unknown kind: "+String.valueOf(kind));
}
}