Add tests for hard and soft links (#12590)

This commit is contained in:
Micha Reiser 2024-08-02 12:14:28 +02:00 committed by GitHub
parent 27edadec29
commit 966563c79b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 604 additions and 108 deletions

View file

@ -39,6 +39,8 @@ pub type Result<T> = std::io::Result<T>;
/// Abstracting the system also enables tests to use a more efficient in-memory file system.
pub trait System: Debug {
/// Reads the metadata of the file or directory at `path`.
///
/// This function will traverse symbolic links to query information about the destination file.
fn path_metadata(&self, path: &SystemPath) -> Result<Metadata>;
/// Reads the content of the file at `path` into a [`String`].