(&self, file_name: &str)
| 44 | } |
| 45 | |
| 46 | pub fn get_file_timestamp(&self, file_name: &str) -> Result<u64, String> { |
| 47 | if self.client_data_regex.is_match(file_name) { |
| 48 | let mut timestamp_string = file_name.to_owned(); |
| 49 | timestamp_string.truncate(13); |
| 50 | let timestamp = timestamp_string.parse::<u64>(); |
| 51 | return match timestamp { |
| 52 | Ok(_) => Ok(timestamp.unwrap()), |
| 53 | Err(_) => Err(String::from("Failed to parse file timestamp")), |
| 54 | }; |
| 55 | } |
| 56 | |
| 57 | Err(String::from("Incorrect file name")) |
| 58 | } |
| 59 | |
| 60 | pub async fn get_file_names(&self, file_path: Option<&str>) -> Result<Vec<String>, String> { |
| 61 | match self.get_driver() { |
no outgoing calls
no test coverage detected