blob: c584c0b12f69175066bdc636e549fb5eb29c4cff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
use crate::vector::FileVector;
pub struct FileCache {
pub vector : FileVector,
pub path : String,
}
impl FileCache {
pub fn from_line(line : String) -> Self {
let ls : Vec<String> = line.split(',').map(|s| s.to_string()).collect();
let v = FileVector::from_hex(ls[1].clone());
let p = ls[0].clone().replace("\0", ",");
Self {
vector : v,
path : p
}
}
}
|