scan_dir is now public

This commit is contained in:
ChristianVisintin
2020-11-28 10:59:12 +01:00
parent 7cba854260
commit 1301967b68

View File

@@ -363,7 +363,7 @@ impl Localhost {
/// Get content of the current directory as a list of fs entry (Windows) /// Get content of the current directory as a list of fs entry (Windows)
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
#[cfg(not(tarpaulin_include))] #[cfg(not(tarpaulin_include))]
fn scan_dir(&self, dir: &Path) -> Result<Vec<FsEntry>, HostError> { pub fn scan_dir(&self, dir: &Path) -> Result<Vec<FsEntry>, HostError> {
let entries = match std::fs::read_dir(dir) { let entries = match std::fs::read_dir(dir) {
Ok(e) => e, Ok(e) => e,
Err(err) => return Err(HostError::new(HostErrorType::DirNotAccessible, Some(err))), Err(err) => return Err(HostError::new(HostErrorType::DirNotAccessible, Some(err))),