distribuidos_tp1_utils/file_utils.rs
1pub fn filepath(dirpath: &str, partition: i64, ro: bool) -> String {
2 let suffix = match ro {
3 true => "",
4 false => ".w",
5 };
6
7 format!("{}/{}.csv{}", &dirpath, partition, suffix)
8}
9
10pub fn dirpath(metric_id: &str, database_path: &str) -> String {
11 format!("{}/{}", database_path, metric_id)
12}