--- a/rust/hg-core/src/vfs.rs Tue Nov 23 19:40:29 2021 +0100
+++ b/rust/hg-core/src/vfs.rs Tue Nov 23 20:04:22 2021 +0100
@@ -16,6 +16,22 @@
self.base.join(relative_path)
}
+ pub fn symlink_metadata(
+ &self,
+ relative_path: impl AsRef<Path>,
+ ) -> Result<std::fs::Metadata, HgError> {
+ let path = self.join(relative_path);
+ std::fs::symlink_metadata(&path).when_reading_file(&path)
+ }
+
+ pub fn read_link(
+ &self,
+ relative_path: impl AsRef<Path>,
+ ) -> Result<PathBuf, HgError> {
+ let path = self.join(relative_path);
+ std::fs::read_link(&path).when_reading_file(&path)
+ }
+
pub fn read(
&self,
relative_path: impl AsRef<Path>,