Runs "list_prefixed_files" and returns their paths
(
url: &str,
store: &dyn ObjectStore,
prefix: Option<Path>,
file_extension: &str,
)
| 1056 | |
| 1057 | /// Runs "list_prefixed_files" and returns their paths |
| 1058 | async fn try_list_prefixed_files( |
| 1059 | url: &str, |
| 1060 | store: &dyn ObjectStore, |
| 1061 | prefix: Option<Path>, |
| 1062 | file_extension: &str, |
| 1063 | ) -> Result<Vec<String>> { |
| 1064 | let session = MockSession::new(); |
| 1065 | let url = ListingTableUrl::parse(url)?; |
| 1066 | let files = url |
| 1067 | .list_prefixed_files(&session, store, prefix, file_extension) |
| 1068 | .await? |
| 1069 | .try_collect::<Vec<_>>() |
| 1070 | .await? |
| 1071 | .into_iter() |
| 1072 | .map(|meta| meta.location.as_ref().to_string()) |
| 1073 | .collect(); |
| 1074 | Ok(files) |
| 1075 | } |
| 1076 | |
| 1077 | #[derive(Debug)] |
| 1078 | struct MockObjectStore { |