Skip to main content

validate_path_with_symlink

Function validate_path_with_symlink 

Source
pub fn validate_path_with_symlink(
    path: &Path,
    workspace: &Path,
    follow_symlinks: bool,
) -> Result<PathBuf>
Expand description

Validate a path with configurable symlink policy.

§Errors

Returns AtomwriteError::WorkspaceJail if the path escapes the workspace. Returns AtomwriteError::InvalidInput if the path contains a null byte. Returns AtomwriteError::SymlinkBlocked if the path is a symbolic link and symlinks are not followed. Returns AtomwriteError::FifoDetected if the path is a FIFO. Returns AtomwriteError::DeviceFile if the path is a device file.