parseDateTimeFromFilename

fun parseDateTimeFromFilename(fileName: String, mediaType: MediaType): LocalDateTime?

Tries to extract a LocalDateTime from a given fileName (and MediaType) for any device for which a DeviceFileNameParser is available.

Return

The parsed LocalDateTime, or null if it could not be parsed.

Parameters

fileName

The fileName to parse the datetime from

mediaType

Whether the given fileName is from a MediaType.Picture or MediaType.Video.