ensure_folder_is_empty#

composer.utils.ensure_folder_is_empty(folder_name)[source]#

Ensure that the given folder is empty.

Hidden files and folders (those beginning with .) and ignored. Sub-folders are checked recursively.

Parameters

folder_name (str | Path) โ€“ The folder to ensure is empty.

Raises

FileExistsError โ€“ If folder_name contains any non-hidden files, recursively.