Working on open

This commit is contained in:
veeso
2021-06-10 22:36:29 +02:00
parent 541a9a55b5
commit d981b77ed7
5 changed files with 115 additions and 57 deletions

View File

@@ -193,6 +193,22 @@ impl FileTransferActivity {
pub(crate) fn found_mut(&mut self) -> Option<&mut FileExplorer> {
self.browser.found_mut()
}
/// ### get_cache_tmp_name
///
/// Get file name for a file in cache
pub(crate) fn get_cache_tmp_name(&self, name: &str) -> Option<String> {
self.cache.as_ref().map(|_| {
format!(
"{}-{}",
name,
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_millis()
)
})
}
}
/**