Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/nifi/pull/2733#discussion_r190155739 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListFile.java --- @@ -255,43 +262,47 @@ public void onScheduled(final ProcessContext context) { final Path absPath = filePath.toAbsolutePath(); final String absPathString = absPath.getParent().toString() + File.separator; + final DateFormat formatter = new SimpleDateFormat(FILE_MODIFY_DATE_ATTR_FORMAT, Locale.US); + attributes.put(CoreAttributes.PATH.key(), relativePathString); attributes.put(CoreAttributes.FILENAME.key(), fileInfo.getFileName()); attributes.put(CoreAttributes.ABSOLUTE_PATH.key(), absPathString); + attributes.put(FILE_SIZE_ATTRIBUTE, Long.toString(fileInfo.getSize())); + attributes.put(FILE_LAST_MODIFY_TIME_ATTRIBUTE, formatter.format(new Date(fileInfo.getLastModifiedTime()))); + + if (context.getProperty(INCLUDE_FILE_ATTRIBUTES).asBoolean()) { --- End diff -- nit: maybe we can read this in the `onScheduled` method
---