chore: readd from_path function

Despite the function not being used directly, it was being used in tests.
Readding the function so tests will pass.
This commit is contained in:
Matan Kushner 2020-02-03 17:13:59 -05:00
parent f14aef4769
commit 860accac55
No known key found for this signature in database
GPG Key ID: 4B98C3A8949CA8A4

View File

@ -177,6 +177,10 @@ pub struct DirContents {
} }
impl DirContents { impl DirContents {
fn from_path(base: &PathBuf) -> Result<Self, std::io::Error> {
Self::from_path_with_timeout(base, Duration::from_secs(30))
}
fn from_path_with_timeout(base: &PathBuf, timeout: Duration) -> Result<Self, std::io::Error> { fn from_path_with_timeout(base: &PathBuf, timeout: Duration) -> Result<Self, std::io::Error> {
let start = SystemTime::now(); let start = SystemTime::now();