Command description
Wait for the specified path to be created or deleted and return whether the event occurred before the timeout.
| input parameters | Input parameter type | Description |
|---|
| File Path | str | File path to wait for |
| Wait for File Event | enum | Create, Delete |
| Timeout | number or str | Maximum waiting time, in seconds |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|
| Wait Result | bool | True if the event occurs; False if the command times out |
Edge Cases
- When waiting for Create, returns
True immediately if the path already exists; returns False if the path is still absent when the timeout expires.
- When waiting for Delete, returns
True immediately if the path is already absent; returns False if the path still exists when the timeout expires.
- The command uses
os.path.exists, so both files and folders count as existing. A timeout returns False instead of raising a timeout exception.
- Wait Type must be Create or Delete, and Timeout must be numeric.
Generation Notes
- Wait for creation or deletion. A timeout returns False and does not raise an exception.