find_closest

FileSet.find_closest(timestamp, filters=None)[source]

Find the closest file to a timestamp

Parameters:
  • timestamp – date either as datetime object or as string (“YYYY-MM-DD hh:mm:ss”). Year, month and day are required. Hours, minutes and seconds are optional.

  • filters – The same filter argument that is allowed for find().

Returns:

The FileInfo object of the found file. If no file was found, a NoFilesError is raised.