Logo
2
  • Introduction
  • What’s new in Conan 2
  • Install
  • Tutorial
  • CI Tutorial
  • Devops guide
  • Security
  • Integrations
  • Examples
  • Reference
    • Commands
    • conanfile.py
    • conanfile.txt
    • Workspace files
    • Recipe tools
      • conan.tools.android
      • conan.tools.apple
      • conan.tools.build
      • conan.tools.cmake
      • conan.tools.CppInfo
      • conan.tools.env
      • conan.tools.files
        • conan.tools.files basic operations
        • conan.tools.files downloads
        • conan.tools.files patches
        • conan.tools.files checksums
        • conan.tools.files.symlinks
      • conan.tools.gnu
      • conan.tools.google
      • conan.tools.intel
      • conan.tools.layout
      • conan.tools.meson
      • conan.tools.microsoft
      • conan.tools.qbs
      • conan.tools.ros
      • conan.tools.sbom
      • conan.tools.scm
      • conan.tools.scons
      • conan.tools.premake
      • conan.tools.system
    • Configuration files
    • Extensions
    • Environment variables
    • The binary model
    • Conan Server
    • Runners
  • Knowledge
  • Incubating features
  • Changelog
conan
  • Reference
  • Recipe tools
  • conan.tools.files
  • conan.tools.files.symlinks
  • Edit on GitHub

conan.tools.files.symlinks¶

conan.tools.files.symlinks.absolute_to_relative_symlinks()¶

absolute_to_relative_symlinks(conanfile, base_folder)¶

Convert the symlinks with absolute paths into relative ones if they are pointing to a file or directory inside the base_folder. Any absolute symlink pointing outside the base_folder will be ignored.

Parameters:
  • conanfile – The current recipe object. Always use self.

  • base_folder – Folder to be scanned.

conan.tools.files.symlinks.remove_external_symlinks()¶

remove_external_symlinks(conanfile, base_folder)¶

Remove the symlinks to files that point outside the base_folder, no matter if relative or absolute.

Parameters:
  • conanfile – The current recipe object. Always use self.

  • base_folder – Folder to be scanned.

conan.tools.files.symlinks.remove_broken_symlinks()¶

remove_broken_symlinks(conanfile, base_folder=None)¶

Remove the broken symlinks, no matter if relative or absolute.

Parameters:
  • conanfile – The current recipe object. Always use self.

  • base_folder – Folder to be scanned.

Previous Next

© Copyright 2016-2024, JFrog. Last updated on Sep 16, 2025.