mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
Fix file watching on macOS if a module-search path is a symlink (#12634)
This commit is contained in:
parent
38e178e914
commit
341a25eec1
11 changed files with 158 additions and 91 deletions
|
@ -43,6 +43,16 @@ pub trait System: Debug {
|
|||
/// This function will traverse symbolic links to query information about the destination file.
|
||||
fn path_metadata(&self, path: &SystemPath) -> Result<Metadata>;
|
||||
|
||||
/// Returns the canonical, absolute form of a path with all intermediate components normalized
|
||||
/// and symbolic links resolved.
|
||||
///
|
||||
/// # Errors
|
||||
/// This function will return an error in the following situations, but is not limited to just these cases:
|
||||
/// * `path` does not exist.
|
||||
/// * A non-final component in `path` is not a directory.
|
||||
/// * the symlink target path is not valid Unicode.
|
||||
fn canonicalize_path(&self, path: &SystemPath) -> Result<SystemPathBuf>;
|
||||
|
||||
/// Reads the content of the file at `path` into a [`String`].
|
||||
fn read_to_string(&self, path: &SystemPath) -> Result<String>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue