private static ZonedDateTime getLastModifiedTime(final Path filepath) throws IOException {
        BasicFileAttributes attributes = Files.readAttributes(filepath, BasicFileAttributes.class);
        return ZonedDateTime.ofInstant(attributes.lastModifiedTime().toInstant(), ZoneOffset.UTC);
    }
Create a FileWatcher on keyStore/trustStore

@param keyStore               path to the keyStore file or null to ignore
@param trustStore             path to the trustStore file or null to ignore
@param onModificationRunnable function to run when a modification to the keyStore or trustStore is detected
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/SSLStoreFilesModificationWatcher.java