qudi.util.paths.get_daily_directory

qudi.util.paths.get_daily_directory(timestamp: datetime | None = None, root: str | None = None, create_missing: bool | None = False) str[source]

Returns a path tree according to the timestamp given.

The directory structure will have the form: root/<YYYY>/<MM>/<YYYY-MM-DD> If no root directory is given, this method will return just the relative path stub: <YYYY>/<MM>/<YYYY-MM-DD>

Parameters:
timestampdatetime.datetime, optional

Timestamp for which to create the daily directory. Defaults to current timestamp if not provided.

rootstr, optional

Root path for the daily directory structure. If not provided, only the relative path stub is returned.

create_missingbool, optional

Indicates if the directory should be created (True) or not (False). Only considered if root is given.

Returns:
str

Path representing the directory structure based on the timestamp.