Check if a provided pack exists in one of the pack paths. :param pack: Pack name. :type pack: ``str`` :rtype: ``bool``
(pack)
| 92 | |
| 93 | |
| 94 | def check_pack_directory_exists(pack): |
| 95 | """ |
| 96 | Check if a provided pack exists in one of the pack paths. |
| 97 | |
| 98 | :param pack: Pack name. |
| 99 | :type pack: ``str`` |
| 100 | |
| 101 | :rtype: ``bool`` |
| 102 | """ |
| 103 | packs_base_paths = get_packs_base_paths() |
| 104 | |
| 105 | for base_dir in packs_base_paths: |
| 106 | pack_path = os.path.join(base_dir, pack) |
| 107 | if os.path.exists(pack_path): |
| 108 | return True |
| 109 | |
| 110 | return False |
| 111 | |
| 112 | |
| 113 | def check_pack_content_directory_exists(pack, content_type): |
nothing calls this directly
no test coverage detected