wait_for_file_modified¶
- emlib.misc.wait_for_file_modified(path, timeout=None)[source]¶
Wait until file is modified.
This is useful when editing a file on an external application which runs in a daemon mode, meaning that opening a file in it might return immediately.
- Parameters:
path (
str
) – the path of the file to monitortimeout (
Optional
[float
]) – how long should we wait for
- Return type:
bool
- Returns:
True if the file was modified, False if it wasn’t or if the operation timed-out