Read the contents of a file into a buffer. The buffer is **appended to**, not cleared.
(&self, path: &str, buffer: &mut Vec<u8>)
| 110 | /// |
| 111 | /// The buffer is **appended to**, not cleared. |
| 112 | fn read_file(&self, path: &str, buffer: &mut Vec<u8>) -> Result<(), Self::Error> { |
| 113 | let abs_path = self.resolve_path(path)?; |
| 114 | let mut file = File::open(&abs_path)?; |
| 115 | file.read_to_end(buffer)?; |
| 116 | Ok(()) |
| 117 | } |
| 118 | |
| 119 | /// Get the modification time of a file. |
| 120 | fn modified_time(&self, path: &str) -> Result<SystemTime, Self::Error> { |