INNER CODE UNIT · Rust

new

XayahSuSuSu/Android-DataBackup · source-next/native/src/main/jni/rustic/src/mapped_source.rs:293

        fn new() -> Self {
            let path = std::env::temp_dir().join(format!(
                "mapped-source-{}",
                SystemTime::now()
                    .duration_since(UNIX_EPOCH)
                    .unwrap()
                    .as_nanos()
            ));
            std::fs::create_dir_all(&path).unwrap();
            Self(path)
        }
        fn write(&self, path: &str, content: &str) -> PathBuf {
            let file = self.0.join(path);
            std::fs::create_dir_all(file.parent().unwrap()).unwrap();
            std::fs::write(&file, content).unwrap();
            file
        }
        fn mapping(&self, source: &str, target: &str) -> SourceMapping {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…