diff options
Diffstat (limited to 'test_util/src')
-rw-r--r-- | test_util/src/fs.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test_util/src/fs.rs b/test_util/src/fs.rs index 57ab8ee10..b2f0eceac 100644 --- a/test_util/src/fs.rs +++ b/test_util/src/fs.rs @@ -47,10 +47,14 @@ impl PathRef { PathRef(self.as_path().parent().unwrap().to_path_buf()) } - pub fn uri(&self) -> Url { + pub fn uri_dir(&self) -> Url { Url::from_directory_path(self.as_path()).unwrap() } + pub fn uri_file(&self) -> Url { + Url::from_file_path(self.as_path()).unwrap() + } + pub fn as_path(&self) -> &Path { self.0.as_path() } |