Get the file name for the apiType Parameters ---------- filepath : str The file path apiType : ApiType The type of the api Returns ------- str The file name with extension
(filepath: str, apiType: ApiType)
| 43 | |
| 44 | |
| 45 | def get_file_name(filepath: str, apiType: ApiType) -> str: |
| 46 | """ |
| 47 | Get the file name for the apiType |
| 48 | |
| 49 | Parameters |
| 50 | ---------- |
| 51 | filepath : str |
| 52 | The file path |
| 53 | apiType : ApiType |
| 54 | The type of the api |
| 55 | |
| 56 | Returns |
| 57 | ------- |
| 58 | str |
| 59 | The file name with extension |
| 60 | """ |
| 61 | |
| 62 | match apiType: |
| 63 | case ApiType.THUMB: |
| 64 | return filepath + ".jpg" |
| 65 | case ApiType.IMAGE: |
| 66 | return "datasource_thumbnail.jpg" |
| 67 | case ApiType.IQDATA: |
| 68 | return filepath + ".sigmf-data" |
| 69 | case ApiType.METADATA: |
| 70 | return filepath + ".sigmf-meta" |
| 71 | case ApiType.MINIMAP: |
| 72 | return filepath + ".minimap" |
| 73 | case _: |
| 74 | raise ValueError("Invalid ApiType value") |
| 75 | |
| 76 | |
| 77 | def add_URL_sasToken(account, container, sasToken, filepath, apiType: ApiType): |
no outgoing calls
no test coverage detected